summaryrefslogtreecommitdiff
path: root/testsuite/tests/overloadedrecflds/should_fail/T19287.hs
blob: 793d0e61e77e7581e654b28a18553efda27c3b3a (plain)
1
2
3
4
5
6
7
8
9
10
11
{-# LANGUAGE DuplicateRecordFields #-}
module Main where

data R a b = R { x :: a , x :: b }

unsafeCoerce :: a -> b
unsafeCoerce i = case (R i i){x = i} of
  R a b -> b

main = do
  print (unsafeCoerce (1 :: Int) :: Bool)