summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/polykinds/T7481.hs12
-rw-r--r--testsuite/tests/polykinds/T7481.stderr4
-rw-r--r--testsuite/tests/polykinds/all.T1
3 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/polykinds/T7481.hs b/testsuite/tests/polykinds/T7481.hs
new file mode 100644
index 0000000000..cb64d393a4
--- /dev/null
+++ b/testsuite/tests/polykinds/T7481.hs
@@ -0,0 +1,12 @@
+ {-# LANGUAGE DataKinds, PolyKinds, RankNTypes, GADTs #-}
+
+module T7481 where
+
+import Data.Proxy
+
+data D a where
+ D1 :: a -> D a
+ D2 :: (a~Int) => D a
+ D3 :: forall (a::k) b. Proxy a -> D b
+
+data Foo :: D * -> * \ No newline at end of file
diff --git a/testsuite/tests/polykinds/T7481.stderr b/testsuite/tests/polykinds/T7481.stderr
new file mode 100644
index 0000000000..bd2d679c3c
--- /dev/null
+++ b/testsuite/tests/polykinds/T7481.stderr
@@ -0,0 +1,4 @@
+
+T7481.hs:12:13:
+ ‛D’ of kind ‛* -> *’ is not promotable
+ In the kind ‛D * -> *’
diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T
index 34253fd45d..005c47a29d 100644
--- a/testsuite/tests/polykinds/all.T
+++ b/testsuite/tests/polykinds/all.T
@@ -97,3 +97,4 @@ test('T8534', normal, compile, [''])
test('T8566', normal, compile_fail,[''])
test('T8616', normal, compile_fail,[''])
test('T8566a', expect_broken(8566), compile,[''])
+test('T7481', normal, compile_fail,['']) \ No newline at end of file