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

Test Trac #12229

parent 0bab375a
{-# LANGUAGE RecordWildCards #-}
module T12229 where
data T = MkT { x, pi :: Float }
f x = MkT { .. } -- 'pi' is not initialised, because
-- there is no local binding
g x pi = MkT { .. } -- 'pi' is initialised
T12229.hs:7:7: warning: [-Wmissing-fields (in -Wdefault)]
• Fields of ‘MkT’ not initialised: pi
• In the expression: MkT {..}
In an equation for ‘f’: f x = MkT {..}
......@@ -138,3 +138,4 @@ test('T10781', normal, compile_fail, [''])
test('T11071', normal, compile_fail, [''])
test('T11071a', normal, compile_fail, [''])
test('T11663', normal, compile_fail, [''])
test('T12229', normal, compile, [''])
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