summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
authorJohn Leo <leo@halfaya.org>2017-01-10 13:36:17 -0500
committerBen Gamari <ben@smart-cactus.org>2017-01-10 13:37:18 -0500
commit8a76d32e4fbdafe787a0f5b2a492c0d0ea1ed980 (patch)
tree399009e76308ac36dbb715d0e985db6060090c49 /testsuite/tests
parent226c5352bb63ab53b11a23484c8ec8f20a57d538 (diff)
downloadhaskell-8a76d32e4fbdafe787a0f5b2a492c0d0ea1ed980.tar.gz
Check that type variable does not reference itself in its kind signature
This fixes #11592. Test Plan: validate Reviewers: simonpj, austin, bgamari, goldfire Reviewed By: goldfire Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2914 GHC Trac Issues: #11592
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/rename/should_fail/T11592.hs10
-rw-r--r--testsuite/tests/rename/should_fail/T11592.stderr19
-rw-r--r--testsuite/tests/rename/should_fail/all.T1
3 files changed, 30 insertions, 0 deletions
diff --git a/testsuite/tests/rename/should_fail/T11592.hs b/testsuite/tests/rename/should_fail/T11592.hs
new file mode 100644
index 0000000000..b963cdf8ba
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T11592.hs
@@ -0,0 +1,10 @@
+{-# LANGUAGE TypeInType #-}
+
+module Bug11592 where
+
+data A (a :: a) = MkA String
+
+data B b (a :: a b) = MkB String
+data C b (a :: b a) = MkC String
+
+data D b c (a :: c a b) = MkD String
diff --git a/testsuite/tests/rename/should_fail/T11592.stderr b/testsuite/tests/rename/should_fail/T11592.stderr
new file mode 100644
index 0000000000..bffea1cca7
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T11592.stderr
@@ -0,0 +1,19 @@
+T11592.hs:5:9:
+ Variable ‘a’ is used in the kind signature of its
+ declaration as a type variable.
+ the data type declaration for ‘A’
+
+T11592.hs:7:11:
+ Variable ‘a’ is used in the kind signature of its
+ declaration as a type variable.
+ the data type declaration for ‘B’
+
+T11592.hs:8:11:
+ Variable ‘a’ is used in the kind signature of its
+ declaration as a type variable.
+ the data type declaration for ‘C’
+
+T11592.hs:10:13:
+ Variable ‘a’ is used in the kind signature of its
+ declaration as a type variable.
+ the data type declaration for ‘D’
diff --git a/testsuite/tests/rename/should_fail/all.T b/testsuite/tests/rename/should_fail/all.T
index d42ca5675f..05fc5e496e 100644
--- a/testsuite/tests/rename/should_fail/all.T
+++ b/testsuite/tests/rename/should_fail/all.T
@@ -142,4 +142,5 @@ test('T11663', normal, compile_fail, [''])
test('T12229', normal, compile, [''])
test('T12681', normal, multimod_compile_fail, ['T12681','-v0'])
test('T12686', normal, compile_fail, [''])
+test('T11592', normal, compile_fail, [''])
test('T12879', normal, compile_fail, [''])