Skip to content
Snippets Groups Projects
Commit 396e01b4 authored by Vladislav Zavialov's avatar Vladislav Zavialov Committed by Marge Bot
Browse files

Add a regression test for #14548

parent 9d9af0ee
No related branches found
No related tags found
No related merge requests found
{-# 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
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’
......@@ -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, [''])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment