Add a test for #7734
authorIan Lynagh <ian@well-typed.com>
Sun, 3 Mar 2013 16:05:43 +0000 (16:05 +0000)
committerIan Lynagh <ian@well-typed.com>
Sun, 3 Mar 2013 16:05:43 +0000 (16:05 +0000)
testsuite/tests/typecheck/should_fail/T7734.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T7734.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/all.T

diff --git a/testsuite/tests/typecheck/should_fail/T7734.hs b/testsuite/tests/typecheck/should_fail/T7734.hs
new file mode 100644 (file)
index 0000000..85f83f5
--- /dev/null
@@ -0,0 +1,5 @@
+
+module T7734 where
+
+x `f` y = x x
+(&) x y = x x
diff --git a/testsuite/tests/typecheck/should_fail/T7734.stderr b/testsuite/tests/typecheck/should_fail/T7734.stderr
new file mode 100644 (file)
index 0000000..d90d136
--- /dev/null
@@ -0,0 +1,18 @@
+
+T7734.hs:4:13:
+    Occurs check: cannot construct the infinite type: t2 ~ t2 -> t1
+    Relevant bindings include
+      f :: (t2 -> t1) -> t -> t1 (bound at T7734.hs:4:1)
+      x :: t2 -> t1 (bound at T7734.hs:4:1)
+    In the first argument of ‛x’, namely ‛x’
+    In the expression: x x
+    In an equation for ‛f’: x `f` y = x x
+
+T7734.hs:5:13:
+    Occurs check: cannot construct the infinite type: t2 ~ t2 -> t1
+    Relevant bindings include
+      & :: (t2 -> t1) -> t -> t1 (bound at T7734.hs:5:1)
+      x :: t2 -> t1 (bound at T7734.hs:5:5)
+    In the first argument of ‛x’, namely ‛x’
+    In the expression: x x
+    In an equation for ‛&’: (&) x y = x x
index 0750c57..dfa0668 100644 (file)
@@ -297,3 +297,4 @@ test('T2247', normal, compile_fail, [''])
 test('T7609', normal, compile_fail, [''])
 test('T7645', normal, compile_fail, [''])
 test('T2354', normal, compile_fail, ['-O'])
+test('T7734', normal, compile_fail, [''])