diff options
author | Ian Lynagh <ian@well-typed.com> | 2013-03-03 16:05:43 +0000 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2013-03-03 16:05:43 +0000 |
commit | 3b88f7546eeef0205d2b6047f6006bbe9ed8d7d0 (patch) | |
tree | 390dee728d97359ac69952d27f03317652c12890 | |
parent | 7341c6b83134d4b3bd8c754d80224de9f548d791 (diff) | |
download | haskell-3b88f7546eeef0205d2b6047f6006bbe9ed8d7d0.tar.gz |
Add a test for #7734
-rw-r--r-- | testsuite/tests/typecheck/should_fail/T7734.hs | 5 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_fail/T7734.stderr | 18 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_fail/all.T | 1 |
3 files changed, 24 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/T7734.hs b/testsuite/tests/typecheck/should_fail/T7734.hs new file mode 100644 index 0000000000..85f83f5281 --- /dev/null +++ b/testsuite/tests/typecheck/should_fail/T7734.hs @@ -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 index 0000000000..d90d136a1a --- /dev/null +++ b/testsuite/tests/typecheck/should_fail/T7734.stderr @@ -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 diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T index 0750c57a81..dfa0668bef 100644 --- a/testsuite/tests/typecheck/should_fail/all.T +++ b/testsuite/tests/typecheck/should_fail/all.T @@ -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, ['']) |