From 42e5b24bc6d842c0cda554b263e03c707849c54e Mon Sep 17 00:00:00 2001 From: simonm Date: Tue, 3 Feb 1998 11:34:32 +0000 Subject: [PATCH] [project @ 1998-02-03 11:34:30 by simonm] duplicate constructor test --- ghc/tests/rename/should_fail/rnfail015.hs | 20 ++++++++++++++++++++ ghc/tests/rename/should_fail/rnfail015.stderr | 6 ++++++ 2 files changed, 26 insertions(+) create mode 100644 ghc/tests/rename/should_fail/rnfail015.hs create mode 100644 ghc/tests/rename/should_fail/rnfail015.stderr 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 -- 1.7.10.4