17 lines
No EOL
361 B
TypeScript
17 lines
No EOL
361 B
TypeScript
// @target: ES5
|
|
function foo(a: number) {
|
|
if (a === 1) {
|
|
function foo() { } // duplicate function
|
|
foo();
|
|
foo(10); // not ok
|
|
}
|
|
else {
|
|
function foo() { } // duplicate function
|
|
foo();
|
|
foo(10); // not ok
|
|
}
|
|
foo(10); // not ok
|
|
foo();
|
|
}
|
|
foo(10);
|
|
foo(); // not ok - needs number
|