summaryrefslogtreecommitdiff
path: root/testsuite/tests/roles/should_fail
diff options
context:
space:
mode:
authorRichard Eisenberg <eir@cis.upenn.edu>2013-10-21 13:04:47 -0400
committerRichard Eisenberg <eir@cis.upenn.edu>2013-10-23 09:23:24 -0400
commit99cd277c181dfb346d5f2d5fc9475379229037d0 (patch)
treea2221e8545ba06078bf9ed7e09e5a47347360ed9 /testsuite/tests/roles/should_fail
parentc43dd9731850df270f98fb37119e935f0fa89735 (diff)
downloadhaskell-99cd277c181dfb346d5f2d5fc9475379229037d0.tar.gz
Update tests to reflect new check for GeneralizedNewtypeDeriving
Diffstat (limited to 'testsuite/tests/roles/should_fail')
-rw-r--r--testsuite/tests/roles/should_fail/Roles10.stderr2
-rw-r--r--testsuite/tests/roles/should_fail/Roles9.hs13
-rw-r--r--testsuite/tests/roles/should_fail/all.T1
3 files changed, 1 insertions, 15 deletions
diff --git a/testsuite/tests/roles/should_fail/Roles10.stderr b/testsuite/tests/roles/should_fail/Roles10.stderr
index 756aaa2e00..76c0c0d63d 100644
--- a/testsuite/tests/roles/should_fail/Roles10.stderr
+++ b/testsuite/tests/roles/should_fail/Roles10.stderr
@@ -3,5 +3,5 @@ Roles10.hs:16:12:
Can't make a derived instance of ‛C Age’
(even with cunning newtype deriving):
it is not type-safe to use GeneralizedNewtypeDeriving on this class;
- the last parameter of ‛C’ is at role Nominal
+ ‛meth’, at type ‛a -> F a’, cannot be converted safely
In the newtype declaration for ‛Age’
diff --git a/testsuite/tests/roles/should_fail/Roles9.hs b/testsuite/tests/roles/should_fail/Roles9.hs
deleted file mode 100644
index f8e134d5a1..0000000000
--- a/testsuite/tests/roles/should_fail/Roles9.hs
+++ /dev/null
@@ -1,13 +0,0 @@
-{-# LANGUAGE GeneralizedNewtypeDeriving, RoleAnnotations #-}
-
-module Roles9 where
-
-type role C nominal
-class C a where
- meth :: a -> a
-
-instance C Int where
- meth = (+ 1)
-
-newtype Age = MkAge Int
- deriving C
diff --git a/testsuite/tests/roles/should_fail/all.T b/testsuite/tests/roles/should_fail/all.T
index 36f2d2e1a4..0e30472b09 100644
--- a/testsuite/tests/roles/should_fail/all.T
+++ b/testsuite/tests/roles/should_fail/all.T
@@ -2,7 +2,6 @@ test('Roles5', normal, compile_fail, [''])
test('Roles6', normal, compile_fail, [''])
test('Roles7', normal, compile_fail, [''])
test('Roles8', normal, compile_fail, [''])
-test('Roles9', normal, compile_fail, [''])
test('Roles10', normal, compile_fail, [''])
test('Roles11', normal, compile_fail, [''])
test('Roles12',