diff options
Diffstat (limited to 'testsuite/tests')
-rw-r--r-- | testsuite/tests/dependent/should_compile/T15264.hs | 15 | ||||
-rw-r--r-- | testsuite/tests/dependent/should_compile/T15264.stderr | 10 | ||||
-rw-r--r-- | testsuite/tests/dependent/should_compile/all.T | 1 |
3 files changed, 26 insertions, 0 deletions
diff --git a/testsuite/tests/dependent/should_compile/T15264.hs b/testsuite/tests/dependent/should_compile/T15264.hs new file mode 100644 index 0000000000..a03cf4346e --- /dev/null +++ b/testsuite/tests/dependent/should_compile/T15264.hs @@ -0,0 +1,15 @@ +{-# LANGUAGE ExplicitForAll, PolyKinds #-} +{-# OPTIONS -Wcompat #-} + +module T15264 where + +import Data.Proxy + +bad1 :: forall (a :: k). Proxy a -> () +bad1 _ = () + +bad2 :: forall (a :: k1) (b :: k2). Proxy a -> () +bad2 _ = () + +good :: forall k (a :: k). Proxy a -> () +good _ = () diff --git a/testsuite/tests/dependent/should_compile/T15264.stderr b/testsuite/tests/dependent/should_compile/T15264.stderr new file mode 100644 index 0000000000..222d686513 --- /dev/null +++ b/testsuite/tests/dependent/should_compile/T15264.stderr @@ -0,0 +1,10 @@ + +T15264.hs:8:22: warning: [-Wimplicit-kind-vars (in -Wcompat)] + An explicit ‘forall’ was used, but the following kind variables are not quantified: ‘k’ + Despite this fact, GHC will introduce them into scope, but it will stop doing so in the future. + Suggested fix: add ‘forall k.’ + +T15264.hs:11:22: warning: [-Wimplicit-kind-vars (in -Wcompat)] + An explicit ‘forall’ was used, but the following kind variables are not quantified: ‘k1’, ‘k2’ + Despite this fact, GHC will introduce them into scope, but it will stop doing so in the future. + Suggested fix: add ‘forall k1 k2.’ diff --git a/testsuite/tests/dependent/should_compile/all.T b/testsuite/tests/dependent/should_compile/all.T index 40ba2110f9..2865351ff5 100644 --- a/testsuite/tests/dependent/should_compile/all.T +++ b/testsuite/tests/dependent/should_compile/all.T @@ -48,4 +48,5 @@ test('T14720', normal, compile, ['']) test('T14066a', normal, compile, ['']) test('T14749', normal, compile, ['']) test('T14991', normal, compile, ['']) +test('T15264', normal, compile, ['']) test('DkNameRes', normal, compile, [''])
\ No newline at end of file |