diff options
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/patsyn/should_fail/T16900.hs | 5 | ||||
-rw-r--r-- | testsuite/tests/patsyn/should_fail/T16900.stderr | 8 | ||||
-rw-r--r-- | testsuite/tests/patsyn/should_fail/all.T | 1 |
3 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/patsyn/should_fail/T16900.hs b/testsuite/tests/patsyn/should_fail/T16900.hs new file mode 100644 index 0000000000..972c90530a --- /dev/null +++ b/testsuite/tests/patsyn/should_fail/T16900.hs @@ -0,0 +1,5 @@ +{-# LANGUAGE PatternSynonyms #-} +module T16900 where + +pattern P1 = P2 +pattern P2 = P1 diff --git a/testsuite/tests/patsyn/should_fail/T16900.stderr b/testsuite/tests/patsyn/should_fail/T16900.stderr new file mode 100644 index 0000000000..2838c7f867 --- /dev/null +++ b/testsuite/tests/patsyn/should_fail/T16900.stderr @@ -0,0 +1,8 @@ + +T16900.hs:4:1: error: + Recursive pattern synonym definition with following bindings: + P1 (defined at T16900.hs:4:1-15) + P2 (defined at T16900.hs:5:1-15) + | +4 | pattern P1 = P2 + | ^^^^^^^^^^^^^^^ diff --git a/testsuite/tests/patsyn/should_fail/all.T b/testsuite/tests/patsyn/should_fail/all.T index 5431e8b76a..27ebc8bdd4 100644 --- a/testsuite/tests/patsyn/should_fail/all.T +++ b/testsuite/tests/patsyn/should_fail/all.T @@ -45,3 +45,4 @@ test('T15289', normal, compile_fail, ['']) test('T15685', normal, compile_fail, ['']) test('T15692', normal, compile, ['']) # It has -fdefer-type-errors inside test('T15694', normal, compile_fail, ['']) +test('T16900', normal, compile_fail, ['-fdiagnostics-show-caret']) |