Test Trac #8649
authorSimon Peyton Jones <simonpj@microsoft.com>
Fri, 10 Jan 2014 09:22:57 +0000 (09:22 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Fri, 10 Jan 2014 09:22:57 +0000 (09:22 +0000)
testsuite/tests/ghci/scripts/T8649.script [new file with mode: 0644]
testsuite/tests/ghci/scripts/T8649.stderr [new file with mode: 0644]
testsuite/tests/ghci/scripts/all.T

diff --git a/testsuite/tests/ghci/scripts/T8649.script b/testsuite/tests/ghci/scripts/T8649.script
new file mode 100644 (file)
index 0000000..017a820
--- /dev/null
@@ -0,0 +1,4 @@
+data X = Y Int
+let f (Y i) = i
+data X = Y Int | Z String
+f (Y 3)
diff --git a/testsuite/tests/ghci/scripts/T8649.stderr b/testsuite/tests/ghci/scripts/T8649.stderr
new file mode 100644 (file)
index 0000000..2bd4584
--- /dev/null
@@ -0,0 +1,8 @@
+
+<interactive>:5:4:
+    Couldn't match expected type ‛Ghci1.X’
+                with actual type ‛X’
+    NB: ‛Ghci1.X’ is defined at <interactive>:2:1-14
+        ‛X’ is defined at <interactive>:4:1-25
+    In the first argument of ‛f’, namely ‛(Y 3)’
+    In the expression: f (Y 3)
index e7a520c..1f051c8 100755 (executable)
@@ -163,3 +163,4 @@ test('T8535', normal, ghci_script, ['T8535.script'])
 test('T8639', normal, ghci_script, ['T8639.script'])
 test('T8640', normal, ghci_script, ['T8640.script'])
 test('T8579', normal, ghci_script, ['T8579.script'])
+test('T8649', normal, ghci_script, ['T8649.script'])