TypeScript/tests/baselines/reference/staticMemberWithStringAndNumberNames.types

38 lines
563 B
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/staticMemberWithStringAndNumberNames.ts ===
class C {
>C : C
static "foo" = 0;
static 0 = 1;
x = C['foo'];
>x : number
>C['foo'] : number
>C : typeof C
x2 = C['0'];
>x2 : number
>C['0'] : number
>C : typeof C
x3 = C[0];
>x3 : number
>C[0] : number
>C : typeof C
static s = C['foo'];
>s : number
>C['foo'] : number
>C : typeof C
static s2 = C['0'];
>s2 : number
>C['0'] : number
>C : typeof C
static s3 = C[0];
>s3 : number
>C[0] : number
>C : typeof C
}