Test Trac #9975
authorSimon Peyton Jones <simonpj@microsoft.com>
Tue, 20 Jan 2015 17:31:54 +0000 (17:31 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Tue, 20 Jan 2015 17:31:54 +0000 (17:31 +0000)
testsuite/tests/patsyn/should_compile/T9975a.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_compile/T9975a.stderr [new file with mode: 0644]
testsuite/tests/patsyn/should_compile/T9975b.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_compile/all.T

diff --git a/testsuite/tests/patsyn/should_compile/T9975a.hs b/testsuite/tests/patsyn/should_compile/T9975a.hs
new file mode 100644 (file)
index 0000000..ed5a2c2
--- /dev/null
@@ -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 (file)
index 0000000..faddb2a
--- /dev/null
@@ -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 (file)
index 0000000..d36f54d
--- /dev/null
@@ -0,0 +1,7 @@
+{-# LANGUAGE RecordWildCards #-}
+{-# LANGUAGE PatternSynonyms #-}
+module T9975b where
+
+data Test = Test { x :: Int }
+pattern PTest wat = Test { x = wat }
+
index 0ef30f0..a046e79 100644 (file)
@@ -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, [''])