From fa48f52a0a2f15433cf7bd333dce457c7b202395 Mon Sep 17 00:00:00 2001 From: Simon Peyton Jones Date: Wed, 25 Apr 2012 15:33:33 +0100 Subject: [PATCH] Test Trac #6021 --- testsuite/tests/polykinds/T6021.hs | 5 +++++ testsuite/tests/polykinds/T6021.stderr | 5 +++++ testsuite/tests/polykinds/all.T | 1 + 3 files changed, 11 insertions(+) create mode 100644 testsuite/tests/polykinds/T6021.hs create mode 100644 testsuite/tests/polykinds/T6021.stderr diff --git a/testsuite/tests/polykinds/T6021.hs b/testsuite/tests/polykinds/T6021.hs new file mode 100644 index 0000000000..5bbd0b6f20 --- /dev/null +++ b/testsuite/tests/polykinds/T6021.hs @@ -0,0 +1,5 @@ +{-# LANGUAGE KindSignatures, MultiParamTypeClasses #-} +module T6021 where + +class Panic a b +instance Panic (a :: b) b diff --git a/testsuite/tests/polykinds/T6021.stderr b/testsuite/tests/polykinds/T6021.stderr new file mode 100644 index 0000000000..d6019063ac --- /dev/null +++ b/testsuite/tests/polykinds/T6021.stderr @@ -0,0 +1,5 @@ + +T6021.hs:5:22: + Type variable `b' used as a kind + In the kind `b' + In the instance declaration for `Panic (a :: b) b' diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T index 6cd12cc11e..92f6414ac4 100644 --- a/testsuite/tests/polykinds/all.T +++ b/testsuite/tests/polykinds/all.T @@ -40,3 +40,4 @@ test('T6036', normal, compile, ['']) test('T6025', normal, run_command, ['$MAKE -s --no-print-directory T6025']) test('T6002', normal, compile, ['']) test('T6039', normal, compile_fail, ['']) +test('T6021', normal, compile_fail, ['']) -- GitLab