mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
30 lines
488 B
TypeScript
30 lines
488 B
TypeScript
// @strict: true
|
|
// @noEmit: true
|
|
// @allowUnreachableCode: false
|
|
|
|
// https://github.com/microsoft/TypeScript/issues/55562
|
|
|
|
function g(str: string) {
|
|
switch (str) {
|
|
case "a":
|
|
return;
|
|
console.log("1");
|
|
console.log("2");
|
|
case "b":
|
|
console.log("3");
|
|
}
|
|
}
|
|
|
|
function h(str: string) {
|
|
switch (str) {
|
|
case "a":
|
|
console.log("1");
|
|
default:
|
|
return;
|
|
console.log("2");
|
|
console.log("3");
|
|
case "b":
|
|
console.log("4");
|
|
}
|
|
}
|