[Git][ghc/ghc][master] Add a regression test for #14548

Marge Bot gitlab at gitlab.haskell.org
Wed May 8 20:11:54 UTC 2019



 Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
396e01b4 by Vladislav Zavialov at 2019-05-08T20:05:52Z
Add a regression test for #14548

- - - - -


3 changed files:

- + testsuite/tests/rename/should_fail/T14548.hs
- + testsuite/tests/rename/should_fail/T14548.stderr
- testsuite/tests/rename/should_fail/all.T


Changes:

=====================================
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


=====================================
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’


=====================================
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, [''])



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/396e01b472bba36530e7eb065b82d311f0da7880

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/396e01b472bba36530e7eb065b82d311f0da7880
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20190508/d454709b/attachment-0001.html>


More information about the ghc-commits mailing list