Skip to content
Snippets Groups Projects
Commit 27d06f4e authored by sof's avatar sof
Browse files

[project @ 1999-09-26 16:05:34 by sof]

Record construction tests
parent 04d9abca
No related merge requests found
-- !!! Check that using a label belonging to another constructor
-- !!! is flagged as being incorrect.
module ShouldFail where
data F
= F { x :: Int }
| G { y :: Int }
z :: F
z = F { y = 2 }
tcfail084.hs:10:
Constructor `F' does not have field `y'
In the right-hand side of a pattern binding: F {y = 2}
Compilation had errors
-- !!! Check that not supplying bindings for strict fields
-- !!! is flagged as being incorrect.
module ShouldFail where
data F
= F { x :: Int, y :: !Int }
z :: F
z = F { x = 2 }
tcfail085.hs:9:
Constructor `F' does not have the required strict field `y'
In the right-hand side of a pattern binding: F {x = 2}
Compilation had errors
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment