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

Test Trac #7989

parent 8b24aa71
module T7989 where
data A = A {a0, a1 :: Int}
data B = B {b0, b1 :: Int}
f x = x { a0 = 3, a1 = 2, b0 = 4, b1 = 5 }
data T = T1 { x,y,v :: Int} | T2 { y,z,v :: Int } | T3 { z,x,v :: Int}
g a = a { x=0, y=0, z=0, v=0 }
h a = a { x=0, a0=0 }
\ No newline at end of file
T7989.hs:6:7:
No constructor has all these fields: ‛a0’, ‛b0’
In the expression: x {a0 = 3, a1 = 2, b0 = 4, b1 = 5}
In an equation for ‛f’: f x = x {a0 = 3, a1 = 2, b0 = 4, b1 = 5}
T7989.hs:9:7:
No constructor has all these fields: ‛x’, ‛y’, ‛z’
In the expression: a {x = 0, y = 0, z = 0, v = 0}
In an equation for ‛g’: g a = a {x = 0, y = 0, z = 0, v = 0}
T7989.hs:11:7:
No constructor has all these fields: ‛x’, ‛a0’
In the expression: a {x = 0, a0 = 0}
In an equation for ‛h’: h a = a {x = 0, a0 = 0}
......@@ -310,3 +310,4 @@ test('T7856', normal, compile_fail, [''])
test('T7869', normal, compile_fail, [''])
test('T7892', normal, compile_fail, [''])
test('T7809', normal, compile_fail, [''])
test('T7989', normal, compile_fail, [''])
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