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 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330
|
=== tests/cases/compiler/capturedLetConstInLoop1.ts ===
declare function use(x: any): any;
>use : Symbol(use, Decl(capturedLetConstInLoop1.ts, 0, 0))
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 0, 21))
//==== let
for (let x in {}) {
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 3, 8))
(function() { return x});
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 3, 8))
(() => x);
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 3, 8))
}
for (let x of []) {
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 8, 8))
(function() { return x});
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 8, 8))
(() => x);
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 8, 8))
}
for (let x = 0; x < 1; ++x) {
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 13, 8))
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 13, 8))
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 13, 8))
(function() { return x});
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 13, 8))
(() => x);
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 13, 8))
}
while (1 === 1) {
let x;
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 19, 7))
(function() { return x});
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 19, 7))
(() => x);
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 19, 7))
}
do {
let x;
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 25, 7))
(function() { return x});
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 25, 7))
(() => x);
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 25, 7))
} while (1 === 1)
for (let y = 0; y < 1; ++y) {
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 30, 8))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 30, 8))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 30, 8))
let x = 1;
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 31, 7))
(function() { return x});
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 31, 7))
(() => x);
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 31, 7))
}
for (let x = 0, y = 1; x < 1; ++x) {
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 36, 8))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 36, 15))
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 36, 8))
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 36, 8))
(function() { return x + y});
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 36, 8))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 36, 15))
(() => x + y);
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 36, 8))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 36, 15))
}
while (1 === 1) {
let x, y;
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 42, 7))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 42, 10))
(function() { return x + y});
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 42, 7))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 42, 10))
(() => x + y);
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 42, 7))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 42, 10))
}
do {
let x, y;
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 48, 7))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 48, 10))
(function() { return x + y});
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 48, 7))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 48, 10))
(() => x + y);
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 48, 7))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 48, 10))
} while (1 === 1)
for (let y = 0; y < 1; ++y) {
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 53, 8))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 53, 8))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 53, 8))
let x = 1;
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 54, 7))
(function() { return x + y});
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 54, 7))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 53, 8))
(() => x + y);
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 54, 7))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 53, 8))
}
for (let y = (use(() => y), 0); y < 1; ++y) {
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 59, 8))
>use : Symbol(use, Decl(capturedLetConstInLoop1.ts, 0, 0))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 59, 8))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 59, 8))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 59, 8))
}
for (let y = 0; use(() => y), y < 1; ++y) {
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 62, 8))
>use : Symbol(use, Decl(capturedLetConstInLoop1.ts, 0, 0))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 62, 8))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 62, 8))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 62, 8))
}
for (let y = 0; y < 1; use(() => y), ++y) {
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 65, 8))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 65, 8))
>use : Symbol(use, Decl(capturedLetConstInLoop1.ts, 0, 0))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 65, 8))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 65, 8))
}
for (let y = (use(() => y), 0); use(() => y), y < 1; use(() => y), ++y) {
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 68, 8))
>use : Symbol(use, Decl(capturedLetConstInLoop1.ts, 0, 0))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 68, 8))
>use : Symbol(use, Decl(capturedLetConstInLoop1.ts, 0, 0))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 68, 8))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 68, 8))
>use : Symbol(use, Decl(capturedLetConstInLoop1.ts, 0, 0))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 68, 8))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 68, 8))
use(() => y);
>use : Symbol(use, Decl(capturedLetConstInLoop1.ts, 0, 0))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 68, 8))
}
//=========const
for (const x in {}) {
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 73, 10))
(function() { return x});
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 73, 10))
(() => x);
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 73, 10))
}
for (const x of []) {
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 78, 10))
(function() { return x});
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 78, 10))
(() => x);
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 78, 10))
}
for (const x = 0; x < 1;) {
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 83, 10))
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 83, 10))
(function() { return x});
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 83, 10))
(() => x);
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 83, 10))
}
while (1 === 1) {
const x = 1;
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 89, 9))
(function() { return x});
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 89, 9))
(() => x);
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 89, 9))
}
do {
const x = 1;
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 95, 9))
(function() { return x});
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 95, 9))
(() => x);
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 95, 9))
} while (1 === 1)
for (const y = 0; y < 1;) {
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 100, 10))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 100, 10))
const x = 1;
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 101, 9))
(function() { return x});
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 101, 9))
(() => x);
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 101, 9))
}
for (const x = 0, y = 1; x < 1;) {
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 106, 10))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 106, 17))
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 106, 10))
(function() { return x + y});
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 106, 10))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 106, 17))
(() => x + y);
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 106, 10))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 106, 17))
}
while (1 === 1) {
const x = 1, y = 1;
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 112, 9))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 112, 16))
(function() { return x + y});
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 112, 9))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 112, 16))
(() => x + y);
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 112, 9))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 112, 16))
}
do {
const x = 1, y = 1;
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 118, 9))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 118, 16))
(function() { return x + y});
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 118, 9))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 118, 16))
(() => x + y);
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 118, 9))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 118, 16))
} while (1 === 1)
for (const y = 0; y < 1;) {
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 123, 10))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 123, 10))
const x = 1;
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 124, 9))
(function() { return x + y});
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 124, 9))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 123, 10))
(() => x + y);
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 124, 9))
>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 123, 10))
}
// https://github.com/Microsoft/TypeScript/issues/20594
declare const sobj: { [x: string]: any };
>sobj : Symbol(sobj, Decl(capturedLetConstInLoop1.ts, 130, 13))
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 130, 23))
for (let sx in sobj) {
>sx : Symbol(sx, Decl(capturedLetConstInLoop1.ts, 131, 8))
>sobj : Symbol(sobj, Decl(capturedLetConstInLoop1.ts, 130, 13))
(() => sobj[sx]);
>sobj : Symbol(sobj, Decl(capturedLetConstInLoop1.ts, 130, 13))
>sx : Symbol(sx, Decl(capturedLetConstInLoop1.ts, 131, 8))
}
declare const iobj: { [x: number]: any };
>iobj : Symbol(iobj, Decl(capturedLetConstInLoop1.ts, 134, 13))
>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 134, 23))
for (let ix in iobj) {
>ix : Symbol(ix, Decl(capturedLetConstInLoop1.ts, 135, 8))
>iobj : Symbol(iobj, Decl(capturedLetConstInLoop1.ts, 134, 13))
(() => iobj[ix]);
>iobj : Symbol(iobj, Decl(capturedLetConstInLoop1.ts, 134, 13))
>ix : Symbol(ix, Decl(capturedLetConstInLoop1.ts, 135, 8))
}
|