summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/polykinds/T11466.hs16
-rw-r--r--testsuite/tests/polykinds/all.T3
2 files changed, 18 insertions, 1 deletions
diff --git a/testsuite/tests/polykinds/T11466.hs b/testsuite/tests/polykinds/T11466.hs
new file mode 100644
index 0000000000..e479af08f3
--- /dev/null
+++ b/testsuite/tests/polykinds/T11466.hs
@@ -0,0 +1,16 @@
+{-# LANGUAGE ImplicitParams, ConstraintKinds #-}
+
+module T11466 where
+
+-- This should be ok
+type Bla = ?x::Int
+
+-- This should be ook
+f :: Bla => Int -> Int
+f y = ?x + y
+
+data T = T
+
+-- But this should be rejected
+instance Bla => Eq T
+
diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T
index 899e47c8bf..f1f25cecc4 100644
--- a/testsuite/tests/polykinds/all.T
+++ b/testsuite/tests/polykinds/all.T
@@ -132,4 +132,5 @@ test('T11249', normal, compile, [''])
test('T11248', normal, compile, [''])
test('T11278', normal, compile, [''])
test('T11255', normal, compile, [''])
-test('T11459', normal, compile_fail, ['']) \ No newline at end of file
+test('T11459', normal, compile_fail, [''])
+test('T11466', normal, compile_fail, [''])