Skip to content

Commit 6859c8e

Browse files
committed
Add failing test for option optimisation
1 parent 81f4b2f commit 6859c8e

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Generated by ReScript, PLEASE EDIT WITH CARE
2+
3+
4+
function bla(val1, val2) {
5+
return "a";
6+
}
7+
8+
export {
9+
bla,
10+
}
11+
/* No side effect */
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
let bla = (~val1: bool, ~val2: bool) => {
2+
let a = Some(val1)
3+
let b = Some(val2)
4+
5+
switch (a, b) {
6+
| (_, Some(true))
7+
| (Some(true), _) => "a"
8+
| _ => "b"
9+
}
10+
}

0 commit comments

Comments
 (0)