summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krz.gogolewski@gmail.com>2018-09-04 15:42:52 +0200
committerKrzysztof Gogolewski <krz.gogolewski@gmail.com>2018-09-04 15:42:52 +0200
commita3a1a17ba7ddbc40b093c732e7e3a916b9531eac (patch)
tree596a7ede779ee64f913ff64d46acd65b3d1c9759 /testsuite
parentdf363a646b66f4dd13d63ec70f18e427cabc8878 (diff)
downloadhaskell-a3a1a17ba7ddbc40b093c732e7e3a916b9531eac.tar.gz
Add a test for Trac #15586
Summary: The bug is already fixed in master. Test Plan: make test TEST=T15586 Reviewers: bgamari, simonpj Reviewed By: simonpj Subscribers: rwbarton, carter GHC Trac Issues: #15586 Differential Revision: https://phabricator.haskell.org/D5118
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/typecheck/should_compile/T15586.hs12
-rw-r--r--testsuite/tests/typecheck/should_compile/all.T1
2 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T15586.hs b/testsuite/tests/typecheck/should_compile/T15586.hs
new file mode 100644
index 0000000000..e8fd4f3bd2
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T15586.hs
@@ -0,0 +1,12 @@
+{-# LANGUAGE GADTs #-}
+
+module STree where
+
+data STree a where
+ STreeIM :: {
+ l :: v a ,
+ stree :: a
+ } -> STree a
+
+insert :: STree a -> STree a
+insert s = s { stree = undefined }
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index 64df3a89d4..c3a90ee24c 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -649,3 +649,4 @@ test('T15412', normal, compile, [''])
test('T15141', normal, compile, [''])
test('T15473', normal, compile_fail, [''])
test('T15499', normal, compile, [''])
+test('T15586', normal, compile, [''])