Test #9204 in roles/should_fail/T9204
authorRichard Eisenberg <eir@cis.upenn.edu>
Tue, 4 Nov 2014 22:40:06 +0000 (17:40 -0500)
committerRichard Eisenberg <eir@cis.upenn.edu>
Wed, 12 Nov 2014 17:36:42 +0000 (12:36 -0500)
testsuite/tests/roles/should_fail/Makefile
testsuite/tests/roles/should_fail/T9204.hs [new file with mode: 0644]
testsuite/tests/roles/should_fail/T9204.hs-boot [new file with mode: 0644]
testsuite/tests/roles/should_fail/T9204.stderr [new file with mode: 0644]
testsuite/tests/roles/should_fail/all.T

index 8f80de3..14d6720 100644 (file)
@@ -7,3 +7,7 @@ include $(TOP)/mk/test.mk
 Roles12:
        '$(TEST_HC)' $(TEST_HC_OPTS) -c Roles12.hs-boot
        -'$(TEST_HC)' $(TEST_HC_OPTS) -c Roles12.hs
+
+T9204:
+       '$(TEST_HC)' $(TEST_HC_OPTS) -c T9204.hs-boot
+       -'$(TEST_HC)' $(TEST_HC_OPTS) -c T9204.hs
diff --git a/testsuite/tests/roles/should_fail/T9204.hs b/testsuite/tests/roles/should_fail/T9204.hs
new file mode 100644 (file)
index 0000000..e2351a2
--- /dev/null
@@ -0,0 +1,6 @@
+
+module T9204 where
+
+import {-# SOURCE #-} T9204
+
+data D a
diff --git a/testsuite/tests/roles/should_fail/T9204.hs-boot b/testsuite/tests/roles/should_fail/T9204.hs-boot
new file mode 100644 (file)
index 0000000..7ee0f1d
--- /dev/null
@@ -0,0 +1,4 @@
+
+module T9204 where
+
+data D a
diff --git a/testsuite/tests/roles/should_fail/T9204.stderr b/testsuite/tests/roles/should_fail/T9204.stderr
new file mode 100644 (file)
index 0000000..9936839
--- /dev/null
@@ -0,0 +1,8 @@
+
+T9204.hs:6:1:
+    Type constructor ‘D’ has conflicting definitions in the module
+    and its hs-boot file
+    Main module: type role D phantom
+                 data D a
+    Boot file:   abstract D a
+    The roles do not match. Roles default to ‘representational’ in boot files
index d0d5c4d..bb90fee 100644 (file)
@@ -7,4 +7,6 @@ test('Roles11', normal, compile_fail, [''])
 test('Roles12',
      extra_clean(['Roles12.o-boot', 'Roles12.hi-boot']),
      run_command, ['$MAKE --no-print-directory -s Roles12'])
-test('T8773', normal, compile_fail, [''])
\ No newline at end of file
+test('T8773', normal, compile_fail, [''])
+test('T9204', [ expect_broken(9204), extra_clean(['T9204.o-boot', 'T9204.hi-boot']) ],
+              run_command, ['$MAKE --no-print-directory -s T9204'])