|
| 1 | +=== tests/cases/compiler/nestedLoops.ts === |
| 2 | +export class Test { |
| 3 | +>Test : Symbol(Test, Decl(nestedLoops.ts, 0, 0)) |
| 4 | + |
| 5 | + constructor() { |
| 6 | + |
| 7 | + let outerArray: Array<number> = [1, 2, 3]; |
| 8 | +>outerArray : Symbol(outerArray, Decl(nestedLoops.ts, 3, 11)) |
| 9 | +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) |
| 10 | + |
| 11 | + let innerArray: Array<number> = [1, 2, 3]; |
| 12 | +>innerArray : Symbol(innerArray, Decl(nestedLoops.ts, 4, 11)) |
| 13 | +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) |
| 14 | + |
| 15 | + for (let outer of outerArray) |
| 16 | +>outer : Symbol(outer, Decl(nestedLoops.ts, 6, 16)) |
| 17 | +>outerArray : Symbol(outerArray, Decl(nestedLoops.ts, 3, 11)) |
| 18 | + |
| 19 | + for (let inner of innerArray) { |
| 20 | +>inner : Symbol(inner, Decl(nestedLoops.ts, 7, 20)) |
| 21 | +>innerArray : Symbol(innerArray, Decl(nestedLoops.ts, 4, 11)) |
| 22 | + |
| 23 | + this.aFunction((newValue, oldValue) => { |
| 24 | +>this.aFunction : Symbol(Test.aFunction, Decl(nestedLoops.ts, 12, 5)) |
| 25 | +>this : Symbol(Test, Decl(nestedLoops.ts, 0, 0)) |
| 26 | +>aFunction : Symbol(Test.aFunction, Decl(nestedLoops.ts, 12, 5)) |
| 27 | +>newValue : Symbol(newValue, Decl(nestedLoops.ts, 8, 32)) |
| 28 | +>oldValue : Symbol(oldValue, Decl(nestedLoops.ts, 8, 41)) |
| 29 | + |
| 30 | + let x = outer + inner + newValue; |
| 31 | +>x : Symbol(x, Decl(nestedLoops.ts, 9, 23)) |
| 32 | +>outer : Symbol(outer, Decl(nestedLoops.ts, 6, 16)) |
| 33 | +>inner : Symbol(inner, Decl(nestedLoops.ts, 7, 20)) |
| 34 | +>newValue : Symbol(newValue, Decl(nestedLoops.ts, 8, 32)) |
| 35 | + |
| 36 | + }); |
| 37 | + } |
| 38 | + } |
| 39 | + |
| 40 | + public aFunction(func: (newValue: any, oldValue: any) => void): void { |
| 41 | +>aFunction : Symbol(Test.aFunction, Decl(nestedLoops.ts, 12, 5)) |
| 42 | +>func : Symbol(func, Decl(nestedLoops.ts, 14, 21)) |
| 43 | +>newValue : Symbol(newValue, Decl(nestedLoops.ts, 14, 28)) |
| 44 | +>oldValue : Symbol(oldValue, Decl(nestedLoops.ts, 14, 42)) |
| 45 | + } |
| 46 | +} |
0 commit comments