[project @ 1998-02-03 11:34:30 by simonm]
authorsimonm <unknown>
Tue, 3 Feb 1998 11:34:32 +0000 (11:34 +0000)
committersimonm <unknown>
Tue, 3 Feb 1998 11:34:32 +0000 (11:34 +0000)
duplicate constructor test

ghc/tests/rename/should_fail/rnfail015.hs [new file with mode: 0644]
ghc/tests/rename/should_fail/rnfail015.stderr [new file with mode: 0644]

diff --git a/ghc/tests/rename/should_fail/rnfail015.hs b/ghc/tests/rename/should_fail/rnfail015.hs
new file mode 100644 (file)
index 0000000..0852c50
--- /dev/null
@@ -0,0 +1,20 @@
+module ShouldFail where
+
+--!!! duplicate constructors in datatype
+-- (bug report from Alex Ferguson, c. 2.06)
+
+data Token
+     =  TokNewline
+     |  TokLiteral
+     |  TokCount
+     |  TokCheck
+     |  TokIs
+     |  TokDeref
+     |  TokFind
+     |  TokLiteral             -- Duplicated!
+     |  TokThe
+
+      deriving Show
+
+main = print TokCount
+
diff --git a/ghc/tests/rename/should_fail/rnfail015.stderr b/ghc/tests/rename/should_fail/rnfail015.stderr
new file mode 100644 (file)
index 0000000..a4add48
--- /dev/null
@@ -0,0 +1,6 @@
+rnfail015.hs:9:
+    Conflicting definitions for `TokLiteral' in the data type declaration for Token
+
+
+Compilation had errors