Skip to content

Commit 994427f

Browse files
committed
Add another test case
1 parent 7f5235e commit 994427f

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
Warning number 8
3+
/.../fixtures/optional_record_field_missing_case_result.res:4:3-7:3
4+
5+
2 │
6+
3 │ let f = v =>
7+
4 │ switch v {
8+
5 │  | {b: Ok(x)} => x
9+
6 │  | {b: Error(y)} => y
10+
7 │  }
11+
8 │
12+
13+
You forgot to handle a possible case here, for example:
14+
| {b: ?None}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
type t = {b?: result<string, string>}
2+
3+
let f = v =>
4+
switch v {
5+
| {b: Ok(x)} => x
6+
| {b: Error(y)} => y
7+
}

0 commit comments

Comments
 (0)