Skip to content

Commit 6222b81

Browse files
committed
Use warning 9 instead of 6 in test
(warning 6 is enabled by default in 4.13+)
1 parent 51b9cdf commit 6222b81

File tree

1 file changed

+14
-17
lines changed

1 file changed

+14
-17
lines changed
Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,31 @@
11
No 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

109
Warning 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
```

0 commit comments

Comments
 (0)