46 lines
681 B
Text
46 lines
681 B
Text
=== 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
|
|
}
|