[commit: ghc] master: Add a failing test for T13644 (c5b28e0)
git at git.haskell.org
git at git.haskell.org
Tue May 9 02:27:12 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/c5b28e06cc71cba56153e59e2958f24cdf183fb9/ghc
>---------------------------------------------------------------
commit c5b28e06cc71cba56153e59e2958f24cdf183fb9
Author: Matthew Pickering <matthewtpickering at gmail.com>
Date: Mon May 8 17:46:39 2017 -0400
Add a failing test for T13644
The problem originates in TcPat.find_field_ty but I don't know how to
clearnly fix it.
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie
GHC Trac Issues: #13644
Differential Revision: https://phabricator.haskell.org/D3535
>---------------------------------------------------------------
c5b28e06cc71cba56153e59e2958f24cdf183fb9
testsuite/tests/rename/should_fail/T13644.hs | 6 ++++++
testsuite/tests/rename/should_fail/T13644.stderr | 6 ++++++
testsuite/tests/rename/should_fail/T13644A.hs | 10 ++++++++++
testsuite/tests/rename/should_fail/T13644B.hs | 3 +++
testsuite/tests/rename/should_fail/T13644C.hs | 3 +++
testsuite/tests/rename/should_fail/all.T | 1 +
6 files changed, 29 insertions(+)
diff --git a/testsuite/tests/rename/should_fail/T13644.hs b/testsuite/tests/rename/should_fail/T13644.hs
new file mode 100644
index 0000000..14a2049
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T13644.hs
@@ -0,0 +1,6 @@
+module T13644 where
+
+import T13644A
+
+baseENDECfuncs :: FuncId -> ()
+baseENDECfuncs FuncId{ name = nm } = undefined
diff --git a/testsuite/tests/rename/should_fail/T13644.stderr b/testsuite/tests/rename/should_fail/T13644.stderr
new file mode 100644
index 0000000..8443993
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T13644.stderr
@@ -0,0 +1,6 @@
+
+T13644.hs:6:24: error:
+ • Constructor ‘FuncId’ does not have field ‘name’
+ • In the pattern: FuncId {name = nm}
+ In an equation for ‘baseENDECfuncs’:
+ baseENDECfuncs FuncId {name = nm} = undefined
diff --git a/testsuite/tests/rename/should_fail/T13644A.hs b/testsuite/tests/rename/should_fail/T13644A.hs
new file mode 100644
index 0000000..7838513
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T13644A.hs
@@ -0,0 +1,10 @@
+module T13644A
+(
+ FuncId(FuncId)
+, module X
+)
+where
+
+import T13644C as X
+
+import T13644B
diff --git a/testsuite/tests/rename/should_fail/T13644B.hs b/testsuite/tests/rename/should_fail/T13644B.hs
new file mode 100644
index 0000000..72913e0
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T13644B.hs
@@ -0,0 +1,3 @@
+module T13644B where
+
+data FuncId = FuncId { name :: () }
diff --git a/testsuite/tests/rename/should_fail/T13644C.hs b/testsuite/tests/rename/should_fail/T13644C.hs
new file mode 100644
index 0000000..530d663
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T13644C.hs
@@ -0,0 +1,3 @@
+module T13644C where
+
+data T = T { name :: () }
diff --git a/testsuite/tests/rename/should_fail/all.T b/testsuite/tests/rename/should_fail/all.T
index 4782685..517d23d 100644
--- a/testsuite/tests/rename/should_fail/all.T
+++ b/testsuite/tests/rename/should_fail/all.T
@@ -125,3 +125,4 @@ test('T12681', normal, multimod_compile_fail, ['T12681','-v0'])
test('T12686', normal, compile_fail, [''])
test('T11592', normal, compile_fail, [''])
test('T12879', normal, compile_fail, [''])
+test('T13644', expect_broken(13644), multimod_compile_fail, ['T13644','-v0'])
More information about the ghc-commits
mailing list