Debian Codegraph @

test-suite/output/RecordMissingField.v

raw
1 (** Check for error message when missing a record field. Error message
2 should contain missing field, and the inferred type of the record **)
3
4 Record point2d := mkPoint { x2p: nat; y2p: nat }.
5
6 Fail Definition increment_x (p: point2d) : point2d :=
7 {| x2p := x2p p + 1; |}.
8
9 (* Here there is also an unresolved implicit, which should give an
10 understadable error as well *)
11 Fail Definition increment_x (p: point2d) : point2d :=
12 {| x2p := x2p p + (fun n => _) 1; |}.