summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladislav Zavialov <vlad.z.4096@gmail.com>2019-05-07 18:17:44 +0300
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-05-08 16:05:52 -0400
commit396e01b472bba36530e7eb065b82d311f0da7880 (patch)
treea20a2e7a73704debd348f4c80a67cd79211b9157
parent9d9af0eea599b82f5567885a36e9059f8484aa39 (diff)
downloadhaskell-396e01b472bba36530e7eb065b82d311f0da7880.tar.gz
Add a regression test for #14548
-rw-r--r--testsuite/tests/rename/should_fail/T14548.hs17
-rw-r--r--testsuite/tests/rename/should_fail/T14548.stderr10
-rw-r--r--testsuite/tests/rename/should_fail/all.T1
3 files changed, 28 insertions, 0 deletions
diff --git a/testsuite/tests/rename/should_fail/T14548.hs b/testsuite/tests/rename/should_fail/T14548.hs
new file mode 100644
index 0000000000..0a7ea5bc63
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T14548.hs
@@ -0,0 +1,17 @@
+{-# LANGUAGE ScopedTypeVariables, TypeApplications, PolyKinds #-}
+
+module T14548 where
+
+data Prox (a :: k) = MkProx
+
+-- fail
+f :: forall a. Prox (a :: k)
+f = MkProx @k @a
+
+-- fail
+g :: forall (a :: k). Prox (a :: k)
+g = MkProx @k @a
+
+-- ok
+h :: forall k (a :: k). Prox (a :: k)
+h = MkProx @k @a
diff --git a/testsuite/tests/rename/should_fail/T14548.stderr b/testsuite/tests/rename/should_fail/T14548.stderr
new file mode 100644
index 0000000000..3527ac4d63
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T14548.stderr
@@ -0,0 +1,10 @@
+
+T14548.hs:8:27: error: Not in scope: type variable ‘k’
+
+T14548.hs:9:13: error: Not in scope: type variable ‘k’
+
+T14548.hs:12:19: error: Not in scope: type variable ‘k’
+
+T14548.hs:12:34: error: Not in scope: type variable ‘k’
+
+T14548.hs:13:13: error: Not in scope: type variable ‘k’
diff --git a/testsuite/tests/rename/should_fail/all.T b/testsuite/tests/rename/should_fail/all.T
index 52a4f45a04..28f97909c1 100644
--- a/testsuite/tests/rename/should_fail/all.T
+++ b/testsuite/tests/rename/should_fail/all.T
@@ -149,3 +149,4 @@ test('ExplicitForAllRules2', normal, compile_fail, [''])
test('T15957_Fail', normal, compile_fail, ['-Werror -Wall -Wno-missing-signatures'])
test('T16385', normal, compile_fail, [''])
test('T16504', normal, compile_fail, [''])
+test('T14548', normal, compile_fail, [''])