diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2016-10-24 17:37:16 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2016-10-24 17:37:16 +0100 |
commit | 853cdaea7f8724cd071f4fa7ad6c5377a2a8a6e4 (patch) | |
tree | 033619ade766154f9d8c4b552c3ef429938633a9 | |
parent | 03b0b8e43ff43365fc52a92d8ff18558f4ee8202 (diff) | |
download | haskell-853cdaea7f8724cd071f4fa7ad6c5377a2a8a6e4.tar.gz |
Test Trac #12081
-rw-r--r-- | testsuite/tests/dependent/should_fail/T12081.hs | 9 | ||||
-rw-r--r-- | testsuite/tests/dependent/should_fail/T12081.stderr | 7 | ||||
-rw-r--r-- | testsuite/tests/dependent/should_fail/all.T | 1 |
3 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/dependent/should_fail/T12081.hs b/testsuite/tests/dependent/should_fail/T12081.hs new file mode 100644 index 0000000000..f68de420cb --- /dev/null +++ b/testsuite/tests/dependent/should_fail/T12081.hs @@ -0,0 +1,9 @@ +{-# LANGUAGE TypeInType #-} + +module T12081 where + +data Nat = Z | S Nat + +class C (n :: Nat) where + type T n :: Nat + f :: (a :: T n) diff --git a/testsuite/tests/dependent/should_fail/T12081.stderr b/testsuite/tests/dependent/should_fail/T12081.stderr new file mode 100644 index 0000000000..77d5a40353 --- /dev/null +++ b/testsuite/tests/dependent/should_fail/T12081.stderr @@ -0,0 +1,7 @@ + +T12081.hs:9:14: error: + • Type constructor ‘T’ cannot be used here + (it is defined and used in the same recursive group) + • In the kind ‘T n’ + In the type signature: f :: (a :: T n) + In the class declaration for ‘C’ diff --git a/testsuite/tests/dependent/should_fail/all.T b/testsuite/tests/dependent/should_fail/all.T index f1ed340aeb..b9c82f131b 100644 --- a/testsuite/tests/dependent/should_fail/all.T +++ b/testsuite/tests/dependent/should_fail/all.T @@ -15,3 +15,4 @@ test('KindLevelsB', normal, compile_fail, ['']) test('T11473', normal, compile_fail, ['']) test('T11471', normal, compile_fail, ['']) test('T12174', normal, compile_fail, ['']) +test('T12081', normal, compile_fail, ['']) |