Add test suite for #8757
authorDr. ERDI Gergo <gergo@erdi.hu>
Sun, 9 Feb 2014 09:27:24 +0000 (17:27 +0800)
committerDr. ERDI Gergo <gergo@erdi.hu>
Sun, 9 Feb 2014 09:27:24 +0000 (17:27 +0800)
testsuite/tests/patsyn/should_fail/local.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_fail/local.stderr [new file with mode: 0644]

diff --git a/testsuite/tests/patsyn/should_fail/local.hs b/testsuite/tests/patsyn/should_fail/local.hs
new file mode 100644 (file)
index 0000000..08314ea
--- /dev/null
@@ -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 (file)
index 0000000..a9a8d01
--- /dev/null
@@ -0,0 +1,4 @@
+
+local.hs:7:5:
+    Illegal pattern synonym declaration
+      Pattern synonym declarations are only valid in the top-level scope