diff options
author | Dr. ERDI Gergo <gergo@erdi.hu> | 2014-02-09 17:27:24 +0800 |
---|---|---|
committer | Dr. ERDI Gergo <gergo@erdi.hu> | 2014-02-09 17:27:24 +0800 |
commit | 719108f8d70aa50cdaccf564dbc463445a03988e (patch) | |
tree | 451ff6aeb180cb882fee7a60c2e041a1b9217429 /testsuite/tests/patsyn | |
parent | e0a55415545074bc7a757462624079f54f7785e2 (diff) | |
download | haskell-719108f8d70aa50cdaccf564dbc463445a03988e.tar.gz |
Add test suite for #8757
Diffstat (limited to 'testsuite/tests/patsyn')
-rw-r--r-- | testsuite/tests/patsyn/should_fail/local.hs | 7 | ||||
-rw-r--r-- | testsuite/tests/patsyn/should_fail/local.stderr | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/patsyn/should_fail/local.hs b/testsuite/tests/patsyn/should_fail/local.hs new file mode 100644 index 0000000000..08314ea432 --- /dev/null +++ b/testsuite/tests/patsyn/should_fail/local.hs @@ -0,0 +1,7 @@ +{-# LANGUAGE PatternSynonyms #-} +module ShouldFail where + +varWithLocalPatSyn x = case x of + P -> () + where + pattern P = () diff --git a/testsuite/tests/patsyn/should_fail/local.stderr b/testsuite/tests/patsyn/should_fail/local.stderr new file mode 100644 index 0000000000..a9a8d01af9 --- /dev/null +++ b/testsuite/tests/patsyn/should_fail/local.stderr @@ -0,0 +1,4 @@ + +local.hs:7:5: + Illegal pattern synonym declaration + Pattern synonym declarations are only valid in the top-level scope |