summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2015-01-20 17:31:54 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2015-01-20 17:31:54 +0000
commit3992a6e2d0fa2f046baaf14c264d21acf9540c83 (patch)
treed008826956e38c120a393a9f9b84ebfe6cbc6170 /testsuite/tests
parent387f1d1ec334788c3e891e9304d427bc804998f4 (diff)
downloadhaskell-3992a6e2d0fa2f046baaf14c264d21acf9540c83.tar.gz
Test Trac #9975
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/patsyn/should_compile/T9975a.hs7
-rw-r--r--testsuite/tests/patsyn/should_compile/T9975a.stderr5
-rw-r--r--testsuite/tests/patsyn/should_compile/T9975b.hs7
-rw-r--r--testsuite/tests/patsyn/should_compile/all.T2
4 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/tests/patsyn/should_compile/T9975a.hs b/testsuite/tests/patsyn/should_compile/T9975a.hs
new file mode 100644
index 0000000000..ed5a2c2bb9
--- /dev/null
+++ b/testsuite/tests/patsyn/should_compile/T9975a.hs
@@ -0,0 +1,7 @@
+{-# LANGUAGE RecordWildCards #-}
+{-# LANGUAGE PatternSynonyms #-}
+module T9975a where
+
+data Test = Test { x :: Int }
+pattern Test wat = Test { x = wat }
+
diff --git a/testsuite/tests/patsyn/should_compile/T9975a.stderr b/testsuite/tests/patsyn/should_compile/T9975a.stderr
new file mode 100644
index 0000000000..faddb2a3e5
--- /dev/null
+++ b/testsuite/tests/patsyn/should_compile/T9975a.stderr
@@ -0,0 +1,5 @@
+
+T9975a.hs:6:1:
+ Multiple declarations of ‘Test’
+ Declared at: T9975a.hs:5:13
+ T9975a.hs:6:1
diff --git a/testsuite/tests/patsyn/should_compile/T9975b.hs b/testsuite/tests/patsyn/should_compile/T9975b.hs
new file mode 100644
index 0000000000..d36f54d92a
--- /dev/null
+++ b/testsuite/tests/patsyn/should_compile/T9975b.hs
@@ -0,0 +1,7 @@
+{-# LANGUAGE RecordWildCards #-}
+{-# LANGUAGE PatternSynonyms #-}
+module T9975b where
+
+data Test = Test { x :: Int }
+pattern PTest wat = Test { x = wat }
+
diff --git a/testsuite/tests/patsyn/should_compile/all.T b/testsuite/tests/patsyn/should_compile/all.T
index 0ef30f0f52..a046e79395 100644
--- a/testsuite/tests/patsyn/should_compile/all.T
+++ b/testsuite/tests/patsyn/should_compile/all.T
@@ -22,3 +22,5 @@ test('ImpExp_Imp', [extra_clean(['ImpExp_Exp.hi', 'ImpExp_Exp.o'])], multimod_co
test('T9857', normal, compile, [''])
test('T9889', normal, compile, [''])
test('T9867', normal, compile, [''])
+test('T9975a', normal, compile_fail, [''])
+test('T9975b', normal, compile, [''])