Skip to content

Commit 0047d51

Browse files
jchavarricristianoc
authored andcommitted
add test for rescript-lang#5359
1 parent d71fcc2 commit 0047d51

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
Warning number 8
3+
/.../fixtures/warnings4.res:11:1-13:1
4+
5+
9 │ @val external x: myType = "myVariable"
6+
10 │
7+
11 │ switch x {
8+
12 │  | #first => Js.log("first")
9+
13 │ }
10+
14 │
11+
12+
You forgot to handle a possible case here, for example:
13+
(#second|#fourth|#third)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
type myType = [
2+
| #first
3+
| #second
4+
| #third
5+
| #fourth
6+
]
7+
8+
// just a quick way to make the switch compile
9+
@val external x: myType = "myVariable"
10+
11+
switch x {
12+
| #first => Js.log("first")
13+
}

0 commit comments

Comments
 (0)