Commit 3ef22a22 authored by Simon Peyton Jones's avatar Simon Peyton Jones

Test for duplicate decls

parent cd3b57cc
......@@ -54,3 +54,5 @@ test('rnfail049', if_compiler_lt('ghc', '6.9', skip), compile_fail, [''])
test('rnfail050', if_compiler_lt('ghc', '6.9', skip), compile_fail, [''])
test('rnfail051', if_compiler_lt('ghc', '6.9', skip), compile_fail, [''])
test('rn_dup', normal, compile_fail, [''])
{-# OPTIONS -fglasgow-exts #-}
-- Test for top-level duplicates
module Dup where
data T = MkT | MkT
data S = MkT
data P = MkP { rf :: Int, rf :: Int }
data Q = MkQ { rf :: Int }
class C a where
data CT a
f :: CT a -> a
data CT a
f :: CT a -> a
rn_dup.hs:9:9:
Multiple declarations of `Dup.MkT'
Declared at: rn_dup.hs:7:15
rn_dup.hs:9:9
rn_dup.hs:9:9:
Multiple declarations of `Dup.MkT'
Declared at: rn_dup.hs:7:9
rn_dup.hs:9:9
rn_dup.hs:12:15:
Multiple declarations of `Dup.rf'
Declared at: rn_dup.hs:11:15
rn_dup.hs:12:15
rn_dup.hs:12:15:
Multiple declarations of `Dup.rf'
Declared at: rn_dup.hs:11:26
rn_dup.hs:12:15
rn_dup.hs:17:7:
Multiple declarations of `Dup.CT'
Declared at: rn_dup.hs:15:7
rn_dup.hs:17:7
rn_dup.hs:18:2:
Multiple declarations of `Dup.f'
Declared at: rn_dup.hs:16:2
rn_dup.hs:18:2
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment