diff options
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/typecheck/should_fail/T17360.hs | 11 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_fail/T17360.stderr | 6 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_fail/all.T | 1 |
3 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/T17360.hs b/testsuite/tests/typecheck/should_fail/T17360.hs new file mode 100644 index 0000000000..fc82675271 --- /dev/null +++ b/testsuite/tests/typecheck/should_fail/T17360.hs @@ -0,0 +1,11 @@ +{-# LANGUAGE UnliftedNewtypes #-} +{-# LANGUAGE ExplicitForAll #-} +{-# LANGUAGE PolyKinds #-} +module T17360 where + +import GHC.Exts + +newtype Id (a :: TYPE r) = Id a + +foo :: forall r (a :: TYPE r). Id a -> Id a +foo x = x diff --git a/testsuite/tests/typecheck/should_fail/T17360.stderr b/testsuite/tests/typecheck/should_fail/T17360.stderr new file mode 100644 index 0000000000..9eccd7fe29 --- /dev/null +++ b/testsuite/tests/typecheck/should_fail/T17360.stderr @@ -0,0 +1,6 @@ + +T17360.hs:11:5: error: + A levity-polymorphic type is not allowed here: + Type: Id a + Kind: TYPE r + In the type of binder ‘x’ diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T index 3f8dfc0abe..75c1fe6f19 100644 --- a/testsuite/tests/typecheck/should_fail/all.T +++ b/testsuite/tests/typecheck/should_fail/all.T @@ -547,3 +547,4 @@ test('T16512a', normal, compile_fail, ['']) test('T16512b', normal, compile_fail, ['']) test('T17213', [extra_files(['T17213a.hs'])], multimod_compile_fail, ['T17213', '-v0']) test('T17355', normal, compile_fail, ['']) +test('T17360', normal, compile_fail, ['']) |