34 lines
656 B
Text
34 lines
656 B
Text
=== tests/cases/compiler/varAsID.ts ===
|
|
|
|
class Foo {
|
|
>Foo : Symbol(Foo, Decl(varAsID.ts, 0, 0))
|
|
|
|
var; // ok
|
|
>var : Symbol(var, Decl(varAsID.ts, 1, 11))
|
|
|
|
x=1;
|
|
>x : Symbol(x, Decl(varAsID.ts, 2, 8))
|
|
}
|
|
|
|
var f = new Foo();
|
|
>f : Symbol(f, Decl(varAsID.ts, 6, 3))
|
|
>Foo : Symbol(Foo, Decl(varAsID.ts, 0, 0))
|
|
|
|
|
|
class Foo2 {
|
|
>Foo2 : Symbol(Foo2, Decl(varAsID.ts, 6, 18))
|
|
|
|
var // not an error, because of ASI.
|
|
>var : Symbol(var, Decl(varAsID.ts, 9, 12))
|
|
|
|
x=1;
|
|
>x : Symbol(x, Decl(varAsID.ts, 10, 7))
|
|
}
|
|
|
|
var f2 = new Foo2();
|
|
>f2 : Symbol(f2, Decl(varAsID.ts, 14, 3))
|
|
>Foo2 : Symbol(Foo2, Decl(varAsID.ts, 6, 18))
|
|
|
|
|
|
|
|
|