TypeScript/tests/baselines/reference/staticMemberWithStringAndNumberNames.types
2015-04-15 16:44:20 -07:00

47 lines
681 B
Plaintext

=== tests/cases/compiler/staticMemberWithStringAndNumberNames.ts ===
class C {
>C : C
static "foo" = 0;
>0 : number
static 0 = 1;
>1 : number
x = C['foo'];
>x : number
>C['foo'] : number
>C : typeof C
>'foo' : string
x2 = C['0'];
>x2 : number
>C['0'] : number
>C : typeof C
>'0' : string
x3 = C[0];
>x3 : number
>C[0] : number
>C : typeof C
>0 : number
static s = C['foo'];
>s : number
>C['foo'] : number
>C : typeof C
>'foo' : string
static s2 = C['0'];
>s2 : number
>C['0'] : number
>C : typeof C
>'0' : string
static s3 = C[0];
>s3 : number
>C[0] : number
>C : typeof C
>0 : number
}