summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/deriving/should_compile/Makefile10
-rw-r--r--testsuite/tests/deriving/should_compile/T11148.hs11
-rw-r--r--testsuite/tests/deriving/should_compile/all.T2
3 files changed, 22 insertions, 1 deletions
diff --git a/testsuite/tests/deriving/should_compile/Makefile b/testsuite/tests/deriving/should_compile/Makefile
index f9e816f13f..581aabbce0 100644
--- a/testsuite/tests/deriving/should_compile/Makefile
+++ b/testsuite/tests/deriving/should_compile/Makefile
@@ -2,7 +2,15 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
-.PHONY: T1133
+.PHONY: T1133 T11148
+
+T11148:
+ $(RM) T11148.hi T11148.o
+ '$(TEST_HC)' $(TEST_HC_OPTS) -c -dunique-increment=-1 T11148.hs
+ # Set the unique-increment to '-1' to trigger the bug
+ # This has to be done on the command line;
+ # an OPTIONS_GHC pragma does not do it
+
T1133:
'$(TEST_HC)' $(TEST_HC_OPTS) -c T1133.hs-boot
'$(TEST_HC)' $(TEST_HC_OPTS) -c T1133a.hs
diff --git a/testsuite/tests/deriving/should_compile/T11148.hs b/testsuite/tests/deriving/should_compile/T11148.hs
new file mode 100644
index 0000000000..5e505beb31
--- /dev/null
+++ b/testsuite/tests/deriving/should_compile/T11148.hs
@@ -0,0 +1,11 @@
+{-# LANGUAGE TypeFamilies #-}
+{-# LANGUAGE DeriveFunctor #-}
+{-# LANGUAGE FlexibleInstances #-}
+
+module T11148 where
+
+data family G a b c d
+data instance G Int b Float d = G deriving Functor
+
+data family H a b c d
+data instance H [b] b d c = H deriving Functor
diff --git a/testsuite/tests/deriving/should_compile/all.T b/testsuite/tests/deriving/should_compile/all.T
index 9ffa07df3d..ac41df4a39 100644
--- a/testsuite/tests/deriving/should_compile/all.T
+++ b/testsuite/tests/deriving/should_compile/all.T
@@ -56,3 +56,5 @@ test('T4896', normal, compile, [''])
test('T7947', extra_clean(['T7947a.o', 'T7947a.hi', 'T7947b.o', 'T7947b.hi']), multimod_compile, ['T7947', '-v0'])
test('T10561', normal, compile_fail, [''])
test('T10487', extra_clean(['T10487_M.o', 'T10487_M.hi']), multimod_compile, ['T10487', '-v0'])
+test('T11148', normal, run_command,
+ ['$MAKE -s --no-print-directory T11148'])