38 lines
563 B
Plaintext
38 lines
563 B
Plaintext
|
=== 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
|
||
|
}
|