1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188
|
=== tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts ===
// delete operator on any type
var ANY: any;
>ANY : Symbol(ANY, Decl(deleteOperatorWithAnyOtherType.ts, 2, 3))
var ANY1;
>ANY1 : Symbol(ANY1, Decl(deleteOperatorWithAnyOtherType.ts, 3, 3))
var ANY2: any[] = ["", ""];
>ANY2 : Symbol(ANY2, Decl(deleteOperatorWithAnyOtherType.ts, 4, 3))
var obj: () => {};
>obj : Symbol(obj, Decl(deleteOperatorWithAnyOtherType.ts, 5, 3))
var obj1 = { x: "", y: () => { }};
>obj1 : Symbol(obj1, Decl(deleteOperatorWithAnyOtherType.ts, 6, 3))
>x : Symbol(x, Decl(deleteOperatorWithAnyOtherType.ts, 6, 12))
>y : Symbol(y, Decl(deleteOperatorWithAnyOtherType.ts, 6, 19))
function foo(): any {
>foo : Symbol(foo, Decl(deleteOperatorWithAnyOtherType.ts, 6, 34))
var a;
>a : Symbol(a, Decl(deleteOperatorWithAnyOtherType.ts, 8, 7))
return a;
>a : Symbol(a, Decl(deleteOperatorWithAnyOtherType.ts, 8, 7))
}
class A {
>A : Symbol(A, Decl(deleteOperatorWithAnyOtherType.ts, 10, 1))
public a: any;
>a : Symbol(A.a, Decl(deleteOperatorWithAnyOtherType.ts, 11, 9))
static foo() {
>foo : Symbol(A.foo, Decl(deleteOperatorWithAnyOtherType.ts, 12, 18))
var a;
>a : Symbol(a, Decl(deleteOperatorWithAnyOtherType.ts, 14, 11))
return a;
>a : Symbol(a, Decl(deleteOperatorWithAnyOtherType.ts, 14, 11))
}
}
module M {
>M : Symbol(M, Decl(deleteOperatorWithAnyOtherType.ts, 17, 1))
export var n: any;
>n : Symbol(n, Decl(deleteOperatorWithAnyOtherType.ts, 19, 14))
}
var objA = new A();
>objA : Symbol(objA, Decl(deleteOperatorWithAnyOtherType.ts, 21, 3))
>A : Symbol(A, Decl(deleteOperatorWithAnyOtherType.ts, 10, 1))
// any type var
var ResultIsBoolean1 = delete ANY1;
>ResultIsBoolean1 : Symbol(ResultIsBoolean1, Decl(deleteOperatorWithAnyOtherType.ts, 24, 3))
>ANY1 : Symbol(ANY1, Decl(deleteOperatorWithAnyOtherType.ts, 3, 3))
var ResultIsBoolean2 = delete ANY2;
>ResultIsBoolean2 : Symbol(ResultIsBoolean2, Decl(deleteOperatorWithAnyOtherType.ts, 25, 3))
>ANY2 : Symbol(ANY2, Decl(deleteOperatorWithAnyOtherType.ts, 4, 3))
var ResultIsBoolean3 = delete A;
>ResultIsBoolean3 : Symbol(ResultIsBoolean3, Decl(deleteOperatorWithAnyOtherType.ts, 26, 3))
>A : Symbol(A, Decl(deleteOperatorWithAnyOtherType.ts, 10, 1))
var ResultIsBoolean4 = delete M;
>ResultIsBoolean4 : Symbol(ResultIsBoolean4, Decl(deleteOperatorWithAnyOtherType.ts, 27, 3))
>M : Symbol(M, Decl(deleteOperatorWithAnyOtherType.ts, 17, 1))
var ResultIsBoolean5 = delete obj;
>ResultIsBoolean5 : Symbol(ResultIsBoolean5, Decl(deleteOperatorWithAnyOtherType.ts, 28, 3))
>obj : Symbol(obj, Decl(deleteOperatorWithAnyOtherType.ts, 5, 3))
var ResultIsBoolean6 = delete obj1;
>ResultIsBoolean6 : Symbol(ResultIsBoolean6, Decl(deleteOperatorWithAnyOtherType.ts, 29, 3))
>obj1 : Symbol(obj1, Decl(deleteOperatorWithAnyOtherType.ts, 6, 3))
// any type literal
var ResultIsBoolean7 = delete undefined;
>ResultIsBoolean7 : Symbol(ResultIsBoolean7, Decl(deleteOperatorWithAnyOtherType.ts, 32, 3))
>undefined : Symbol(undefined)
var ResultIsBoolean8 = delete null;
>ResultIsBoolean8 : Symbol(ResultIsBoolean8, Decl(deleteOperatorWithAnyOtherType.ts, 33, 3))
// any type expressions
var ResultIsBoolean9 = delete ANY2[0];
>ResultIsBoolean9 : Symbol(ResultIsBoolean9, Decl(deleteOperatorWithAnyOtherType.ts, 36, 3))
>ANY2 : Symbol(ANY2, Decl(deleteOperatorWithAnyOtherType.ts, 4, 3))
var ResultIsBoolean10 = delete obj1.x;
>ResultIsBoolean10 : Symbol(ResultIsBoolean10, Decl(deleteOperatorWithAnyOtherType.ts, 37, 3))
>obj1.x : Symbol(x, Decl(deleteOperatorWithAnyOtherType.ts, 6, 12))
>obj1 : Symbol(obj1, Decl(deleteOperatorWithAnyOtherType.ts, 6, 3))
>x : Symbol(x, Decl(deleteOperatorWithAnyOtherType.ts, 6, 12))
var ResultIsBoolean11 = delete obj1.y;
>ResultIsBoolean11 : Symbol(ResultIsBoolean11, Decl(deleteOperatorWithAnyOtherType.ts, 38, 3))
>obj1.y : Symbol(y, Decl(deleteOperatorWithAnyOtherType.ts, 6, 19))
>obj1 : Symbol(obj1, Decl(deleteOperatorWithAnyOtherType.ts, 6, 3))
>y : Symbol(y, Decl(deleteOperatorWithAnyOtherType.ts, 6, 19))
var ResultIsBoolean12 = delete objA.a;
>ResultIsBoolean12 : Symbol(ResultIsBoolean12, Decl(deleteOperatorWithAnyOtherType.ts, 39, 3))
>objA.a : Symbol(A.a, Decl(deleteOperatorWithAnyOtherType.ts, 11, 9))
>objA : Symbol(objA, Decl(deleteOperatorWithAnyOtherType.ts, 21, 3))
>a : Symbol(A.a, Decl(deleteOperatorWithAnyOtherType.ts, 11, 9))
var ResultIsBoolean13 = delete M.n;
>ResultIsBoolean13 : Symbol(ResultIsBoolean13, Decl(deleteOperatorWithAnyOtherType.ts, 40, 3))
>M.n : Symbol(M.n, Decl(deleteOperatorWithAnyOtherType.ts, 19, 14))
>M : Symbol(M, Decl(deleteOperatorWithAnyOtherType.ts, 17, 1))
>n : Symbol(M.n, Decl(deleteOperatorWithAnyOtherType.ts, 19, 14))
var ResultIsBoolean14 = delete foo();
>ResultIsBoolean14 : Symbol(ResultIsBoolean14, Decl(deleteOperatorWithAnyOtherType.ts, 41, 3))
>foo : Symbol(foo, Decl(deleteOperatorWithAnyOtherType.ts, 6, 34))
var ResultIsBoolean15 = delete A.foo();
>ResultIsBoolean15 : Symbol(ResultIsBoolean15, Decl(deleteOperatorWithAnyOtherType.ts, 42, 3))
>A.foo : Symbol(A.foo, Decl(deleteOperatorWithAnyOtherType.ts, 12, 18))
>A : Symbol(A, Decl(deleteOperatorWithAnyOtherType.ts, 10, 1))
>foo : Symbol(A.foo, Decl(deleteOperatorWithAnyOtherType.ts, 12, 18))
var ResultIsBoolean16 = delete (ANY + ANY1);
>ResultIsBoolean16 : Symbol(ResultIsBoolean16, Decl(deleteOperatorWithAnyOtherType.ts, 43, 3))
>ANY : Symbol(ANY, Decl(deleteOperatorWithAnyOtherType.ts, 2, 3))
>ANY1 : Symbol(ANY1, Decl(deleteOperatorWithAnyOtherType.ts, 3, 3))
var ResultIsBoolean17 = delete (null + undefined);
>ResultIsBoolean17 : Symbol(ResultIsBoolean17, Decl(deleteOperatorWithAnyOtherType.ts, 44, 3))
>undefined : Symbol(undefined)
var ResultIsBoolean18 = delete (null + null);
>ResultIsBoolean18 : Symbol(ResultIsBoolean18, Decl(deleteOperatorWithAnyOtherType.ts, 45, 3))
var ResultIsBoolean19 = delete (undefined + undefined);
>ResultIsBoolean19 : Symbol(ResultIsBoolean19, Decl(deleteOperatorWithAnyOtherType.ts, 46, 3))
>undefined : Symbol(undefined)
>undefined : Symbol(undefined)
// multiple delete operators
var ResultIsBoolean20 = delete delete ANY;
>ResultIsBoolean20 : Symbol(ResultIsBoolean20, Decl(deleteOperatorWithAnyOtherType.ts, 49, 3))
>ANY : Symbol(ANY, Decl(deleteOperatorWithAnyOtherType.ts, 2, 3))
var ResultIsBoolean21 = delete delete delete (ANY + ANY1);
>ResultIsBoolean21 : Symbol(ResultIsBoolean21, Decl(deleteOperatorWithAnyOtherType.ts, 50, 3))
>ANY : Symbol(ANY, Decl(deleteOperatorWithAnyOtherType.ts, 2, 3))
>ANY1 : Symbol(ANY1, Decl(deleteOperatorWithAnyOtherType.ts, 3, 3))
// miss assignment operators
delete ANY;
>ANY : Symbol(ANY, Decl(deleteOperatorWithAnyOtherType.ts, 2, 3))
delete ANY1;
>ANY1 : Symbol(ANY1, Decl(deleteOperatorWithAnyOtherType.ts, 3, 3))
delete ANY2[0];
>ANY2 : Symbol(ANY2, Decl(deleteOperatorWithAnyOtherType.ts, 4, 3))
delete ANY, ANY1;
>ANY : Symbol(ANY, Decl(deleteOperatorWithAnyOtherType.ts, 2, 3))
>ANY1 : Symbol(ANY1, Decl(deleteOperatorWithAnyOtherType.ts, 3, 3))
delete obj1.x;
>obj1.x : Symbol(x, Decl(deleteOperatorWithAnyOtherType.ts, 6, 12))
>obj1 : Symbol(obj1, Decl(deleteOperatorWithAnyOtherType.ts, 6, 3))
>x : Symbol(x, Decl(deleteOperatorWithAnyOtherType.ts, 6, 12))
delete obj1.y;
>obj1.y : Symbol(y, Decl(deleteOperatorWithAnyOtherType.ts, 6, 19))
>obj1 : Symbol(obj1, Decl(deleteOperatorWithAnyOtherType.ts, 6, 3))
>y : Symbol(y, Decl(deleteOperatorWithAnyOtherType.ts, 6, 19))
delete objA.a;
>objA.a : Symbol(A.a, Decl(deleteOperatorWithAnyOtherType.ts, 11, 9))
>objA : Symbol(objA, Decl(deleteOperatorWithAnyOtherType.ts, 21, 3))
>a : Symbol(A.a, Decl(deleteOperatorWithAnyOtherType.ts, 11, 9))
delete M.n;
>M.n : Symbol(M.n, Decl(deleteOperatorWithAnyOtherType.ts, 19, 14))
>M : Symbol(M, Decl(deleteOperatorWithAnyOtherType.ts, 17, 1))
>n : Symbol(M.n, Decl(deleteOperatorWithAnyOtherType.ts, 19, 14))
|