diff options
Diffstat (limited to 'testsuite/tests')
-rw-r--r-- | testsuite/tests/patsyn/should_compile/T22521.hs | 9 | ||||
-rw-r--r-- | testsuite/tests/patsyn/should_compile/all.T | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/tests/patsyn/should_compile/T22521.hs b/testsuite/tests/patsyn/should_compile/T22521.hs new file mode 100644 index 0000000000..0fbac4f49e --- /dev/null +++ b/testsuite/tests/patsyn/should_compile/T22521.hs @@ -0,0 +1,9 @@ +{-# LANGUAGE PatternSynonyms #-} +{-# LANGUAGE ViewPatterns #-} +module Bug (pattern P) where + +pattern P :: C a => a +pattern P <- (m -> True) + +class C a where + m :: a -> Bool diff --git a/testsuite/tests/patsyn/should_compile/all.T b/testsuite/tests/patsyn/should_compile/all.T index e8da69d553..93a0bdb123 100644 --- a/testsuite/tests/patsyn/should_compile/all.T +++ b/testsuite/tests/patsyn/should_compile/all.T @@ -82,3 +82,4 @@ test('T16682', [extra_files(['T16682.hs', 'T16682a.hs'])], test('T17775-singleton', normal, compile, ['']) test('T14630', normal, compile, ['-Wname-shadowing']) test('T21531', [ grep_errmsg(r'INLINE') ], compile, ['-ddump-ds']) +test('T22521', normal, compile, ['']) |