Commit 55cc01a9 authored by Erik de Castro Lopo's avatar Erik de Castro Lopo

Add test case for #8806.

GHC 7.6.3 and earlier should fail to type check this but don't.
This was fixed some time between the 7.6.3 and the 7.8rc1 release, so
we're just adding a test to prevent future regressions.
parent 3361e6c7
-- Trac #8806
module T8806 where
f :: Int => Int
f x = x + 1
g :: (Int => Show a) => Int
g = undefined
T8806.hs:5:6:
Expected a constraint, but ‛Int’ has kind ‛*’
In the type signature for ‛f’: f :: Int => Int
T8806.hs:8:7:
Expected a constraint, but ‛Int’ has kind ‛*’
In the type signature for ‛g’: g :: Int => Show a => Int
......@@ -330,3 +330,4 @@ test('ContextStack2', normal, compile_fail, ['-ftype-function-depth=10'])
test('T8570', extra_clean(['T85570a.o', 'T8570a.hi','T85570b.o', 'T8570b.hi']),
multimod_compile_fail, ['T8570', '-v0'])
test('T8603', normal, compile_fail, [''])
test('T8806', normal, compile_fail, [''])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment