diff --git a/tests/baselines/reference/ES5For-of12.errors.txt b/tests/baselines/reference/ES5For-of12.errors.txt index 55144f549a0..02ed4c335a6 100644 --- a/tests/baselines/reference/ES5For-of12.errors.txt +++ b/tests/baselines/reference/ES5For-of12.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/statements/for-ofStatements/ES5For-of12.ts(1,6): error TS2461: Type 'undefined' is not an array type. +tests/cases/conformance/statements/for-ofStatements/ES5For-of12.ts(1,7): error TS2364: Invalid left-hand side of assignment expression. ==== tests/cases/conformance/statements/for-ofStatements/ES5For-of12.ts (1 errors) ==== - for ([""] of []) { } - ~~~~ -!!! error TS2461: Type 'undefined' is not an array type. \ No newline at end of file + for ([""] of [[""]]) { } + ~~ +!!! error TS2364: Invalid left-hand side of assignment expression. \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of12.js b/tests/baselines/reference/ES5For-of12.js index c3665e8b584..7a5534f4aa1 100644 --- a/tests/baselines/reference/ES5For-of12.js +++ b/tests/baselines/reference/ES5For-of12.js @@ -1,7 +1,11 @@ //// [ES5For-of12.ts] -for ([""] of []) { } +for ([""] of [[""]]) { } //// [ES5For-of12.js] -for (var _i = 0, _a = []; _i < _a.length; _i++) { +for (var _i = 0, _a = [ + [ + "" + ] +]; _i < _a.length; _i++) { "" = _a[_i][0]; } diff --git a/tests/cases/conformance/statements/for-ofStatements/ES5For-of12.ts b/tests/cases/conformance/statements/for-ofStatements/ES5For-of12.ts index 5fbfa31df5f..eb3017296aa 100644 --- a/tests/cases/conformance/statements/for-ofStatements/ES5For-of12.ts +++ b/tests/cases/conformance/statements/for-ofStatements/ES5For-of12.ts @@ -1 +1 @@ -for ([""] of []) { } \ No newline at end of file +for ([""] of [[""]]) { } \ No newline at end of file