* Fix #11660: wrong reports that block-scoped variable used before its declaration * Fix code style in checker.ts * Add unit test for #11660 * Fix the unit test for #11660
21 lines
365 B
TypeScript
21 lines
365 B
TypeScript
// @outFile: test.js
|
|
|
|
// @fileName: A.ts
|
|
namespace ts {
|
|
export function printVersion():void {
|
|
log("Version: " + sys.version); // the call of sys.version is deferred, should not report an error.
|
|
}
|
|
|
|
export function log(info:string):void {
|
|
|
|
}
|
|
}
|
|
|
|
// @fileName: B.ts
|
|
namespace ts {
|
|
|
|
export let sys:{version:string} = {version: "2.0.5"};
|
|
|
|
}
|
|
|