mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
fbb2755f29
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: jakebailey <[email protected]>
77 lines
858 B
TypeScript
77 lines
858 B
TypeScript
// @allowUnreachableCode: false
|
|
// @preserveConstEnums: true
|
|
|
|
// while (true);
|
|
var x = 1;
|
|
|
|
namespace A {
|
|
while (true);
|
|
let x;
|
|
}
|
|
|
|
namespace A1 {
|
|
do {} while(true);
|
|
namespace A {
|
|
interface F {}
|
|
}
|
|
}
|
|
|
|
namespace A2 {
|
|
while (true);
|
|
namespace A {
|
|
var x = 1;
|
|
}
|
|
}
|
|
|
|
namespace A3 {
|
|
while (true);
|
|
type T = string;
|
|
}
|
|
|
|
namespace A4 {
|
|
while (true);
|
|
namespace A {
|
|
const enum E { X }
|
|
}
|
|
}
|
|
|
|
function f1(x) {
|
|
if (x) {
|
|
return;
|
|
}
|
|
else {
|
|
throw new Error("123");
|
|
}
|
|
var x;
|
|
}
|
|
|
|
function f2() {
|
|
return;
|
|
class A {
|
|
}
|
|
}
|
|
|
|
namespace B {
|
|
for (; ;);
|
|
namespace C {
|
|
}
|
|
}
|
|
|
|
function f3() {
|
|
do {
|
|
} while (true);
|
|
enum E {
|
|
X = 1
|
|
}
|
|
}
|
|
|
|
function f4() {
|
|
if (true) {
|
|
throw new Error();
|
|
}
|
|
const enum E {
|
|
X = 1
|
|
}
|
|
}
|
|
|