Pattern matching gives confusing error messages
While investigating #213 (closed), I found the following testcase:
type foo = { bar: int } invariant { true }
let baz (v: foo): int = match v with { bar = b } -> b end
File "foo.mlw", line 2, characters 37-48:
Function mk foo is not a constructor
Either removing the invariant from foo
or using v.bar
in baz
avoid the issue.