[commit: ghc] master: Add test suite for #8757 (719108f)

git at git.haskell.org git at git.haskell.org
Sun Feb 9 09:27:38 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/719108f8d70aa50cdaccf564dbc463445a03988e/ghc

>---------------------------------------------------------------

commit 719108f8d70aa50cdaccf564dbc463445a03988e
Author: Dr. ERDI Gergo <gergo at erdi.hu>
Date:   Sun Feb 9 17:27:24 2014 +0800

    Add test suite for #8757


>---------------------------------------------------------------

719108f8d70aa50cdaccf564dbc463445a03988e
 testsuite/tests/patsyn/should_fail/local.hs     |    7 +++++++
 testsuite/tests/patsyn/should_fail/local.stderr |    4 ++++
 2 files changed, 11 insertions(+)

diff --git a/testsuite/tests/patsyn/should_fail/local.hs b/testsuite/tests/patsyn/should_fail/local.hs
new file mode 100644
index 0000000..08314ea
--- /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 0000000..a9a8d01
--- /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



More information about the ghc-commits mailing list