From: simonm Date: Tue, 3 Feb 1998 11:34:32 +0000 (+0000) Subject: [project @ 1998-02-03 11:34:30 by simonm] X-Git-Tag: Approx_2487_patches~1010 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;ds=sidebyside;h=42e5b24bc6d842c0cda554b263e03c707849c54e;p=ghc-hetmet.git [project @ 1998-02-03 11:34:30 by simonm] duplicate constructor test --- diff --git a/ghc/tests/rename/should_fail/rnfail015.hs b/ghc/tests/rename/should_fail/rnfail015.hs new file mode 100644 index 0000000..0852c50 --- /dev/null +++ b/ghc/tests/rename/should_fail/rnfail015.hs @@ -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 index 0000000..a4add48 --- /dev/null +++ b/ghc/tests/rename/should_fail/rnfail015.stderr @@ -0,0 +1,6 @@ + +rnfail015.hs:9: + Conflicting definitions for `TokLiteral' in the data type declaration for Token + + +Compilation had errors