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

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 ()