summaryrefslogtreecommitdiff
path: root/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail09.hs
blob: 0f8198d22dd4d9060871c149a0cf985b3e8ba3ab (plain)
1
2
3
4
5
6
7
8
9
10
11
{-# LANGUAGE DuplicateRecordFields, TemplateHaskell, NoMonomorphismRestriction #-}

data S = MkS { x :: Int }
data T = MkT { x :: Int }

-- This tests what happens when an ambiguous record update is used in
-- a splice: since it can't be represented in TH, it should error
-- cleanly, rather than panicking or silently using one field.
foo = [e| (MkS 3) { x = 3 } |]

main = return ()