41 lines
963 B
Text
41 lines
963 B
Text
=== tests/cases/compiler/moduleScopingBug.ts ===
|
|
module M
|
|
>M : Symbol(M, Decl(moduleScopingBug.ts, 0, 0))
|
|
|
|
{
|
|
|
|
var outer: number;
|
|
>outer : Symbol(outer, Decl(moduleScopingBug.ts, 4, 7))
|
|
|
|
function f() {
|
|
>f : Symbol(f, Decl(moduleScopingBug.ts, 4, 22))
|
|
|
|
var inner = outer; // Ok
|
|
>inner : Symbol(inner, Decl(moduleScopingBug.ts, 8, 11))
|
|
>outer : Symbol(outer, Decl(moduleScopingBug.ts, 4, 7))
|
|
|
|
}
|
|
|
|
class C {
|
|
>C : Symbol(C, Decl(moduleScopingBug.ts, 10, 5))
|
|
|
|
constructor() {
|
|
var inner = outer; // Ok
|
|
>inner : Symbol(inner, Decl(moduleScopingBug.ts, 15, 15))
|
|
>outer : Symbol(outer, Decl(moduleScopingBug.ts, 4, 7))
|
|
}
|
|
|
|
}
|
|
|
|
module X {
|
|
>X : Symbol(X, Decl(moduleScopingBug.ts, 18, 5))
|
|
|
|
var inner = outer; // Error: outer not visible
|
|
>inner : Symbol(inner, Decl(moduleScopingBug.ts, 22, 11))
|
|
>outer : Symbol(outer, Decl(moduleScopingBug.ts, 4, 7))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|