summaryrefslogtreecommitdiff
path: root/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail02.hs
blob: 7160438af1ddf149721ee791cdebed9fb0a162e2 (plain)
1
2
3
4
5
6
7
8
9
-- Test selectors cannot be used ambiguously

{-# LANGUAGE DuplicateRecordFields #-}

data R = MkR { x :: Int, y :: Bool }
data S = MkS { x :: Int }

main = do print (x (MkS 42))
          print (y (MkR 42 42))