summaryrefslogtreecommitdiff
path: root/testsuite/tests/rename/should_fail/T2723.hs
blob: 74f11af778161acf3f2efa6a06f56042cbb3faef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{-# OPTIONS_GHC -fwarn-name-shadowing -XNamedFieldPuns -XRecordWildCards #-}
module WildCard where

data Record = Record {field1 :: Int, field2 :: Double}

field3 :: Int
field3 = 3

test1 (Record {field1, field2}) = let test = 1 in field1

test2 :: (Record, Int)
test2 = let
    field1 = 10
    field2 = 10.0
    field3 = 8
    in (Record {..}, field3)