59 lines
2.5 KiB
Text
59 lines
2.5 KiB
Text
=== tests/cases/conformance/expressions/unaryOperators/voidOperator/voidOperatorWithEnumType.ts ===
|
|
// void operator on enum type
|
|
|
|
enum ENUM { };
|
|
>ENUM : Symbol(ENUM, Decl(voidOperatorWithEnumType.ts, 0, 0))
|
|
|
|
enum ENUM1 { A, B, "" };
|
|
>ENUM1 : Symbol(ENUM1, Decl(voidOperatorWithEnumType.ts, 2, 14))
|
|
>A : Symbol(ENUM1.A, Decl(voidOperatorWithEnumType.ts, 3, 12))
|
|
>B : Symbol(ENUM1.B, Decl(voidOperatorWithEnumType.ts, 3, 15))
|
|
|
|
// enum type var
|
|
var ResultIsAny1 = void ENUM;
|
|
>ResultIsAny1 : Symbol(ResultIsAny1, Decl(voidOperatorWithEnumType.ts, 6, 3))
|
|
>ENUM : Symbol(ENUM, Decl(voidOperatorWithEnumType.ts, 0, 0))
|
|
|
|
var ResultIsAny2 = void ENUM1;
|
|
>ResultIsAny2 : Symbol(ResultIsAny2, Decl(voidOperatorWithEnumType.ts, 7, 3))
|
|
>ENUM1 : Symbol(ENUM1, Decl(voidOperatorWithEnumType.ts, 2, 14))
|
|
|
|
// enum type expressions
|
|
var ResultIsAny3 = void ENUM1["A"];
|
|
>ResultIsAny3 : Symbol(ResultIsAny3, Decl(voidOperatorWithEnumType.ts, 10, 3))
|
|
>ENUM1 : Symbol(ENUM1, Decl(voidOperatorWithEnumType.ts, 2, 14))
|
|
>"A" : Symbol(ENUM1.A, Decl(voidOperatorWithEnumType.ts, 3, 12))
|
|
|
|
var ResultIsAny4 = void (ENUM[0] + ENUM1["B"]);
|
|
>ResultIsAny4 : Symbol(ResultIsAny4, Decl(voidOperatorWithEnumType.ts, 11, 3))
|
|
>ENUM : Symbol(ENUM, Decl(voidOperatorWithEnumType.ts, 0, 0))
|
|
>ENUM1 : Symbol(ENUM1, Decl(voidOperatorWithEnumType.ts, 2, 14))
|
|
>"B" : Symbol(ENUM1.B, Decl(voidOperatorWithEnumType.ts, 3, 15))
|
|
|
|
// multiple void operators
|
|
var ResultIsAny5 = void void ENUM;
|
|
>ResultIsAny5 : Symbol(ResultIsAny5, Decl(voidOperatorWithEnumType.ts, 14, 3))
|
|
>ENUM : Symbol(ENUM, Decl(voidOperatorWithEnumType.ts, 0, 0))
|
|
|
|
var ResultIsAny6 = void void void (ENUM[0] + ENUM1.B);
|
|
>ResultIsAny6 : Symbol(ResultIsAny6, Decl(voidOperatorWithEnumType.ts, 15, 3))
|
|
>ENUM : Symbol(ENUM, Decl(voidOperatorWithEnumType.ts, 0, 0))
|
|
>ENUM1.B : Symbol(ENUM1.B, Decl(voidOperatorWithEnumType.ts, 3, 15))
|
|
>ENUM1 : Symbol(ENUM1, Decl(voidOperatorWithEnumType.ts, 2, 14))
|
|
>B : Symbol(ENUM1.B, Decl(voidOperatorWithEnumType.ts, 3, 15))
|
|
|
|
// miss assignment operators
|
|
void ENUM;
|
|
>ENUM : Symbol(ENUM, Decl(voidOperatorWithEnumType.ts, 0, 0))
|
|
|
|
void ENUM1;
|
|
>ENUM1 : Symbol(ENUM1, Decl(voidOperatorWithEnumType.ts, 2, 14))
|
|
|
|
void ENUM1["B"];
|
|
>ENUM1 : Symbol(ENUM1, Decl(voidOperatorWithEnumType.ts, 2, 14))
|
|
>"B" : Symbol(ENUM1.B, Decl(voidOperatorWithEnumType.ts, 3, 15))
|
|
|
|
void ENUM, ENUM1;
|
|
>ENUM : Symbol(ENUM, Decl(voidOperatorWithEnumType.ts, 0, 0))
|
|
>ENUM1 : Symbol(ENUM1, Decl(voidOperatorWithEnumType.ts, 2, 14))
|
|
|