[commit: ghc] wip/rae: Test #9204 in roles/should_fail/T9204 (9a42c0e)
git at git.haskell.org
git at git.haskell.org
Wed Nov 5 19:00:02 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/rae
Link : http://ghc.haskell.org/trac/ghc/changeset/9a42c0e1d042e250be393bbca16a56355f0e90d8/ghc
>---------------------------------------------------------------
commit 9a42c0e1d042e250be393bbca16a56355f0e90d8
Author: Richard Eisenberg <eir at cis.upenn.edu>
Date: Tue Nov 4 17:40:06 2014 -0500
Test #9204 in roles/should_fail/T9204
>---------------------------------------------------------------
9a42c0e1d042e250be393bbca16a56355f0e90d8
testsuite/tests/roles/should_fail/Makefile | 4 ++++
testsuite/tests/roles/should_fail/T9204.hs | 6 ++++++
testsuite/tests/roles/should_fail/T9204.hs-boot | 4 ++++
testsuite/tests/roles/should_fail/T9204.stderr | 9 +++++++++
testsuite/tests/roles/should_fail/all.T | 2 ++
5 files changed, 25 insertions(+)
diff --git a/testsuite/tests/roles/should_fail/Makefile b/testsuite/tests/roles/should_fail/Makefile
index 8f80de3..14d6720 100644
--- a/testsuite/tests/roles/should_fail/Makefile
+++ b/testsuite/tests/roles/should_fail/Makefile
@@ -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
index 0000000..e2351a2
--- /dev/null
+++ b/testsuite/tests/roles/should_fail/T9204.hs
@@ -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
index 0000000..7ee0f1d
--- /dev/null
+++ b/testsuite/tests/roles/should_fail/T9204.hs-boot
@@ -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
index 0000000..aa2f558
--- /dev/null
+++ b/testsuite/tests/roles/should_fail/T9204.stderr
@@ -0,0 +1,9 @@
+
+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
diff --git a/testsuite/tests/roles/should_fail/all.T b/testsuite/tests/roles/should_fail/all.T
index d0d5c4d..bb90fee 100644
--- a/testsuite/tests/roles/should_fail/all.T
+++ b/testsuite/tests/roles/should_fail/all.T
@@ -8,3 +8,5 @@ test('Roles12',
extra_clean(['Roles12.o-boot', 'Roles12.hi-boot']),
run_command, ['$MAKE --no-print-directory -s Roles12'])
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'])
More information about the ghc-commits
mailing list