-
Notifications
You must be signed in to change notification settings - Fork 155
Closed
Description
The following snippets generate unreachable code (break;) in switch:
JS linter running on compiled code is complaining on these.
foo = switch bar
| \a =>
if baz then 1 else 2
| \b => 3var foo;
foo = (function(){
switch (bar) {
case 'a':
if (baz) {
return 1;
} else {
return 2;
}
break; // <-- HERE
case 'b':
return 3;
}
}());foo = switch bar
| \a =>
switch baz
| \1 => 1
| \2 => 2
| \b => 3var foo;
foo = (function(){
switch (bar) {
case 'a':
switch (baz) {
case '1':
return 1;
case '2':
return 2;
}
break; // <-- HERE
case 'b':
return 3;
}
}());Metadata
Metadata
Assignees
Labels
No labels