diff --git a/testsuite/tests/rename/should_fail/T14548.hs b/testsuite/tests/rename/should_fail/T14548.hs new file mode 100644 index 0000000000000000000000000000000000000000..0a7ea5bc6316ef3995176b795b7b741184383382 --- /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 0000000000000000000000000000000000000000..3527ac4d63201b8c53dedd4d3b71d975ea417876 --- /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 52a4f45a04b0456285b1421e1fe1c9d6c8f0c56e..28f97909c121e9f2c7c5c1b4fd5afe302d5d0d52 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, [''])