diff --git a/ghc/tests/rename/should_fail/rnfail015.hs b/ghc/tests/rename/should_fail/rnfail015.hs new file mode 100644 index 0000000000000000000000000000000000000000..0852c5035326650c48ec9d8d2d5a180a7e81c670 --- /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 0000000000000000000000000000000000000000..a4add481153c2eaac8dfe33295dab6a0edb8871c --- /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