Commit fe5776b4 authored by Simon Peyton Jones's avatar Simon Peyton Jones

Test Trac #2723

parent 5e4fb4ff
{-# 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)
T2723.hs:15:4:
Warning: This binding for `field3' shadows the existing binding
defined at T2723.hs:7:0
In the binding group for: field1, field2, field3
......@@ -69,4 +69,5 @@ test('rnfail055',
test('rn_dup', normal, compile_fail, [''])
test('T2310', normal, compile_fail, [''])
test('T2490', normal, compile_fail, [''])
test('T2723', normal, compile, ['']) # Warnings only
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment