diff --git a/tests/baselines/reference/assignmentNestedInLiterals.js b/tests/baselines/reference/assignmentNestedInLiterals.js index cd4bc6c669..8a04808256 100644 --- a/tests/baselines/reference/assignmentNestedInLiterals.js +++ b/tests/baselines/reference/assignmentNestedInLiterals.js @@ -4,6 +4,10 @@ target = [x = 1, y = x]; var aegis, a, b; aegis = { x: a = 1, y: b = a }; + +var kowloona, c, d; +for (kowloona of [c = 1, d = c]) { +} //// [assignmentNestedInLiterals.js] @@ -11,3 +15,7 @@ var target, x, y; target = [x = 1, y = x]; var aegis, a, b; aegis = { x: a = 1, y: b = a }; +var kowloona, c, d; +for (var _i = 0, _a = [c = 1, d = c]; _i < _a.length; _i++) { + kowloona = _a[_i]; +} diff --git a/tests/baselines/reference/assignmentNestedInLiterals.symbols b/tests/baselines/reference/assignmentNestedInLiterals.symbols index 90edd9ed04..761930ab9c 100644 --- a/tests/baselines/reference/assignmentNestedInLiterals.symbols +++ b/tests/baselines/reference/assignmentNestedInLiterals.symbols @@ -23,3 +23,15 @@ aegis = { x: a = 1, y: b = a }; >b : Symbol(b, Decl(assignmentNestedInLiterals.ts, 3, 13)) >a : Symbol(a, Decl(assignmentNestedInLiterals.ts, 3, 10)) +var kowloona, c, d; +>kowloona : Symbol(kowloona, Decl(assignmentNestedInLiterals.ts, 6, 3)) +>c : Symbol(c, Decl(assignmentNestedInLiterals.ts, 6, 13)) +>d : Symbol(d, Decl(assignmentNestedInLiterals.ts, 6, 16)) + +for (kowloona of [c = 1, d = c]) { +>kowloona : Symbol(kowloona, Decl(assignmentNestedInLiterals.ts, 6, 3)) +>c : Symbol(c, Decl(assignmentNestedInLiterals.ts, 6, 13)) +>d : Symbol(d, Decl(assignmentNestedInLiterals.ts, 6, 16)) +>c : Symbol(c, Decl(assignmentNestedInLiterals.ts, 6, 13)) +} + diff --git a/tests/baselines/reference/assignmentNestedInLiterals.types b/tests/baselines/reference/assignmentNestedInLiterals.types index 8c4d5aadc7..8ab73f8069 100644 --- a/tests/baselines/reference/assignmentNestedInLiterals.types +++ b/tests/baselines/reference/assignmentNestedInLiterals.types @@ -33,3 +33,19 @@ aegis = { x: a = 1, y: b = a }; >b : any >a : number +var kowloona, c, d; +>kowloona : any +>c : any +>d : any + +for (kowloona of [c = 1, d = c]) { +>kowloona : any +>[c = 1, d = c] : number[] +>c = 1 : 1 +>c : any +>1 : 1 +>d = c : number +>d : any +>c : number +} + diff --git a/tests/cases/compiler/assignmentNestedInLiterals.ts b/tests/cases/compiler/assignmentNestedInLiterals.ts index 5b1f52cb45..09d8c94488 100644 --- a/tests/cases/compiler/assignmentNestedInLiterals.ts +++ b/tests/cases/compiler/assignmentNestedInLiterals.ts @@ -4,3 +4,7 @@ target = [x = 1, y = x]; var aegis, a, b; aegis = { x: a = 1, y: b = a }; + +var kowloona, c, d; +for (kowloona of [c = 1, d = c]) { +}