[commit: ghc] master: Test Trac #12229 (dadd8b8)
git at git.haskell.org
git at git.haskell.org
Fri Jun 24 10:27:48 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/dadd8b84a6ba157d54d6f84be247f9dbf06e1611/ghc
>---------------------------------------------------------------
commit dadd8b84a6ba157d54d6f84be247f9dbf06e1611
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Fri Jun 24 11:31:32 2016 +0100
Test Trac #12229
>---------------------------------------------------------------
dadd8b84a6ba157d54d6f84be247f9dbf06e1611
testsuite/tests/rename/should_fail/T12229.hs | 11 +++++++++++
testsuite/tests/rename/should_fail/T12229.stderr | 5 +++++
testsuite/tests/rename/should_fail/all.T | 1 +
3 files changed, 17 insertions(+)
diff --git a/testsuite/tests/rename/should_fail/T12229.hs b/testsuite/tests/rename/should_fail/T12229.hs
new file mode 100644
index 0000000..5f5bea4
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T12229.hs
@@ -0,0 +1,11 @@
+{-# LANGUAGE RecordWildCards #-}
+
+module T12229 where
+
+data T = MkT { x, pi :: Float }
+
+f x = MkT { .. } -- 'pi' is not initialised, because
+ -- there is no local binding
+
+g x pi = MkT { .. } -- 'pi' is initialised
+
diff --git a/testsuite/tests/rename/should_fail/T12229.stderr b/testsuite/tests/rename/should_fail/T12229.stderr
new file mode 100644
index 0000000..4fc8678
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T12229.stderr
@@ -0,0 +1,5 @@
+
+T12229.hs:7:7: warning: [-Wmissing-fields (in -Wdefault)]
+ • Fields of ‘MkT’ not initialised: pi
+ • In the expression: MkT {..}
+ In an equation for ‘f’: f x = MkT {..}
diff --git a/testsuite/tests/rename/should_fail/all.T b/testsuite/tests/rename/should_fail/all.T
index 78b80e8..3ddfea2 100644
--- a/testsuite/tests/rename/should_fail/all.T
+++ b/testsuite/tests/rename/should_fail/all.T
@@ -138,3 +138,4 @@ test('T10781', normal, compile_fail, [''])
test('T11071', normal, compile_fail, [''])
test('T11071a', normal, compile_fail, [''])
test('T11663', normal, compile_fail, [''])
+test('T12229', normal, compile, [''])
More information about the ghc-commits
mailing list