[commit: testsuite] master: Test Trac #7336 (7a57e1a)

Simon Peyton Jones <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/7a57e1a7785dcb178fe58fca6992e9677a8f64b9

>---------------------------------------------------------------

commit 7a57e1a7785dcb178fe58fca6992e9677a8f64b9
Author: Simon Peyton Jones <[email protected]>
Date:   Sat Oct 27 18:38:55 2012 +0100

    Test Trac #7336

>---------------------------------------------------------------

 tests/rename/should_compile/T7336.hs     |    8 ++++++++
 tests/rename/should_compile/T7336.stderr |    3 +++
 tests/rename/should_compile/all.T        |    1 +
 3 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/tests/rename/should_compile/T7336.hs b/tests/rename/should_compile/T7336.hs
new file mode 100644
index 0000000..166bae6
--- /dev/null
+++ b/tests/rename/should_compile/T7336.hs
@@ -0,0 +1,8 @@
+module T7336 ( U, T ) where
+
+data U = MkU deriving Show
+-- Want to report MkU as unused
+
+data T = MkT deriving Read
+-- But MkT is not unused; we might
+-- parse a string to generate it
diff --git a/tests/rename/should_compile/T7336.stderr b/tests/rename/should_compile/T7336.stderr
new file mode 100644
index 0000000..bd51e73
--- /dev/null
+++ b/tests/rename/should_compile/T7336.stderr
@@ -0,0 +1,3 @@
+
+T7336.hs:3:10: Warning:
+    Defined but not used: data constructor `MkU'
diff --git a/tests/rename/should_compile/all.T b/tests/rename/should_compile/all.T
index b3acb90..0a51cd7 100644
--- a/tests/rename/should_compile/all.T
+++ b/tests/rename/should_compile/all.T
@@ -201,3 +201,4 @@ test('dodgy',
      multimod_compile,
      ['dodgy', '-v0'])
 test('T7167', normal, compile, [''])
+test('T7336', normal, compile, ['-Wall'])
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.