File tree Expand file tree Collapse file tree 1 file changed +14
-17
lines changed
test/bin/mdx-test/expect/warnings Expand file tree Collapse file tree 1 file changed +14
-17
lines changed Original file line number Diff line number Diff line change 11No warning is printed by default:
22
33``` ocaml
4- let () =
5- let f ~x:() = () in
6- f ();;
7- let x = 4
4+ type p = { x : int ; y : int }
5+
6+ let x { x } = x
87```
98
109Warning attributes must be set to print them:
1110
1211``` ocaml version<4.12
13- [@@@warning "+6"]
14- let () =
15- let f ~x:() = () in
16- f ();;
17- let x = 4
12+ [@@@warning "+9"]
13+ let x { x } = x
1814```
1915``` mdx-error
2016...
21- Warning 6: label x was omitted in the application of this function.
17+ Warning 9: the following labels are not bound in this record pattern:
18+ y
19+ Either bind these labels explicitly or add '; _' to the pattern.
2220```
2321
2422``` ocaml version>=4.12
25- [@@@warning "+6"]
26- let () =
27- let f ~x:() = () in
28- f ();;
29- let x = 4
23+ [@@@warning "+9"]
24+ let x { x } = x
3025```
3126``` mdx-error
32- Line 4, characters 5-6:
33- Warning 6 [labels-omitted]: label x was omitted in the application of this function.
27+ Line 2, characters 9-14:
28+ Warning 9 [missing-record-field-pattern]: the following labels are not bound in this record pattern:
29+ y
30+ Either bind these labels explicitly or add '; _' to the pattern.
3431```
You can’t perform that action at this time.
0 commit comments