summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_run/tcrun005.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_run/tcrun005.hs')
-rw-r--r--testsuite/tests/typecheck/should_run/tcrun005.hs25
1 files changed, 25 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_run/tcrun005.hs b/testsuite/tests/typecheck/should_run/tcrun005.hs
new file mode 100644
index 0000000000..2c315725ef
--- /dev/null
+++ b/testsuite/tests/typecheck/should_run/tcrun005.hs
@@ -0,0 +1,25 @@
+-- !!! Dfun naming bug
+
+module Main where
+
+
+ data TT = TT
+ data TTT = TTT
+
+ class CC a where
+ op_cc :: a -> a
+
+ class CCT a where
+ op_cct :: a -> a
+
+ -- These two instances should get different dfun names!
+ -- In GHC 4.04 they both got $fCCTTT
+
+ instance CC TTT where
+ op_cc = id
+
+ instance CCT TT where
+ op_cct = id
+
+ main = case op_cc TTT of
+ TTT -> print "ok"