File tree 2 files changed +36
-32
lines changed
2 files changed +36
-32
lines changed Original file line number Diff line number Diff line change 1
1
type kind = First | Second | Third
2
2
type r = {name : string , age : int }
3
3
4
- let _ = (kind , kindStr ) => {
5
- let _ifThenElse = if kind == First {
6
- // ^act
7
- "First"
8
- } else {
9
- "Not First"
10
- }
4
+ let ret = _ => assert false
5
+ let kind = assert false
11
6
12
- let _ternary = #kind ("First" , {name : "abc" , age : 3 }) != kindStr ? "Not First" : "First"
13
- // ^act
7
+ if kind == First {
8
+ // ^act
9
+ ret ("First" )
10
+ } else {
11
+ ret ("Not First" )
14
12
}
13
+
14
+ #kind ("First" , {name : "abc" , age : 3 }) != kind ? ret ("Not First" ) : ret ("First" )
15
+ // ^act
Original file line number Diff line number Diff line change 1
- Actions tests/src/Actions.res 4:20
1
+ Actions tests/src/Actions.res 6:5
2
2
Formatted:
3
3
type kind = First | Second | Third
4
4
type r = {name: string, age: int}
5
5
6
- let _ = (kind, kindStr) => {
7
- let _ifThenElse = switch kind {
8
- | First => // ^act
9
- "First"
10
- | _ => "Not First"
11
- }
6
+ let ret = _ => assert false
7
+ let kind = assert false
12
8
13
- let _ternary = #kind("First", {name: "abc", age: 3}) != kindStr ? "Not First" : "First"
14
- // ^act
9
+ switch kind {
10
+ | First =>
11
+ // ^act
12
+ ret("First")
13
+ | _ => ret("Not First")
15
14
}
16
15
17
- Actions tests/src/Actions.res 11:17
16
+ #kind("First", {name: "abc", age: 3}) != kind ? ret("Not First") : ret("First")
17
+ // ^act
18
+
19
+ Actions tests/src/Actions.res 13:15
18
20
Formatted:
19
21
type kind = First | Second | Third
20
22
type r = {name: string, age: int}
21
23
22
- let _ = (kind, kindStr) => {
23
- let _ifThenElse = if kind == First {
24
- // ^act
25
- "First"
26
- } else {
27
- "Not First"
28
- }
29
-
30
- let _ternary = switch kindStr {
31
- | #kind("First", {name: "abc", age: 3}) => "First"
32
- | _ => "Not First"
33
- }
34
- // ^act
24
+ let ret = _ => assert false
25
+ let kind = assert false
26
+
27
+ if kind == First {
28
+ // ^act
29
+ ret("First")
30
+ } else {
31
+ ret("Not First")
32
+ }
33
+
34
+ switch kind {
35
+ | #kind("First", {name: "abc", age: 3}) => ret("First")
36
+ // ^act
37
+ | _ => ret("Not First")
35
38
}
36
39
You can’t perform that action at this time.
0 commit comments