Skip to content

Commit 2a5d637

Browse files
committed
add test files
1 parent 69ccd83 commit 2a5d637

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module X = {
2+
type y = {d: int}
3+
type x = {
4+
a: int,
5+
b: int,
6+
c: option<y>,
7+
}
8+
9+
let x = {a: 1, b: 2, c: Some({d: 3})}
10+
}
11+
12+
let f = X.x.c->Option.map(v => v.d)
13+
14+
/* === AVAILABLE ACTIONS:
15+
- UnwrapOptionMapRecordField(d) - Unwrap the option first before accessing the record field
16+
*/
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module X = {
2+
type y = {d: int}
3+
type x = {
4+
a: int,
5+
b: int,
6+
c: option<y>,
7+
}
8+
9+
let x = {a: 1, b: 2, c: Some({d: 3})}
10+
}
11+
12+
let f = X.x.c.d

0 commit comments

Comments
 (0)