29 lines
831 B
Text
29 lines
831 B
Text
=== tests/cases/compiler/constDeclarations-scopes2.ts ===
|
|
|
|
// global
|
|
const c = "string";
|
|
>c : Symbol(c, Decl(constDeclarations-scopes2.ts, 2, 5))
|
|
|
|
var n: number;
|
|
>n : Symbol(n, Decl(constDeclarations-scopes2.ts, 4, 3))
|
|
|
|
var b: boolean;
|
|
>b : Symbol(b, Decl(constDeclarations-scopes2.ts, 5, 3))
|
|
|
|
// for scope
|
|
for (const c = 0; c < 10; n = c ) {
|
|
>c : Symbol(c, Decl(constDeclarations-scopes2.ts, 8, 10))
|
|
>c : Symbol(c, Decl(constDeclarations-scopes2.ts, 8, 10))
|
|
>n : Symbol(n, Decl(constDeclarations-scopes2.ts, 4, 3))
|
|
>c : Symbol(c, Decl(constDeclarations-scopes2.ts, 8, 10))
|
|
|
|
// for block
|
|
const c = false;
|
|
>c : Symbol(c, Decl(constDeclarations-scopes2.ts, 10, 9))
|
|
|
|
b = c;
|
|
>b : Symbol(b, Decl(constDeclarations-scopes2.ts, 5, 3))
|
|
>c : Symbol(c, Decl(constDeclarations-scopes2.ts, 10, 9))
|
|
}
|
|
|
|
|