summaryrefslogtreecommitdiff
path: root/testsuite/tests/deriving/should_fail/T2721.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/deriving/should_fail/T2721.hs')
-rw-r--r--testsuite/tests/deriving/should_fail/T2721.hs15
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/deriving/should_fail/T2721.hs b/testsuite/tests/deriving/should_fail/T2721.hs
new file mode 100644
index 0000000000..f6485ce514
--- /dev/null
+++ b/testsuite/tests/deriving/should_fail/T2721.hs
@@ -0,0 +1,15 @@
+{-# LANGUAGE TypeFamilies, GeneralizedNewtypeDeriving #-}
+
+-- Trac #2721
+
+module T2721 where
+
+class C a where
+ type T a
+ foo :: a -> T a
+
+instance C Int where
+ type T Int = Int
+ foo = id
+
+newtype N = N Int deriving(C)