Files
ValueScript/inputs/passing/switch/defaultFallthrough.ts
2023-07-06 10:22:05 +10:00

20 lines
310 B
TypeScript

//! test_output(["default","matched 42"])
export default function foo() {
let logs: string[] = [];
switch (21 + 22) {
case 1:
logs.push("matched 1");
break;
default:
logs.push("default");
// falls through
case 42:
logs.push("matched 42");
}
return logs;
}