[commit: ghc] ghc-7.8: Add test suite for #8757 (40705fb)
git at git.haskell.org
git at git.haskell.org
Mon Feb 17 09:15:09 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-7.8
Link : http://ghc.haskell.org/trac/ghc/changeset/40705fbe3e57196cd91baa41a1e8571955f94841/ghc
>---------------------------------------------------------------
commit 40705fbe3e57196cd91baa41a1e8571955f94841
Author: Dr. ERDI Gergo <gergo at erdi.hu>
Date: Sun Feb 9 17:27:24 2014 +0800
Add test suite for #8757
(cherry picked from commit 719108f8d70aa50cdaccf564dbc463445a03988e)
>---------------------------------------------------------------
40705fbe3e57196cd91baa41a1e8571955f94841
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