mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
The completion value of a switch case is incorrectly reset to undefined when a statement without a result (like a variable declaration) follows an expression statement. This will be fixed in the next commit.
4 lines
209 B
JavaScript
4 lines
209 B
JavaScript
console.log(eval("switch(1) { case 1: 'hello'; let x = 1; }"));
|
|
console.log(eval("switch(1) { case 1: 'first'; 'second'; }"));
|
|
console.log(eval("switch(1) { case 1: 'matched'; break; default: 'default'; }"));
|