Change a test to be more interesting

This commit is contained in:
Jason Freeman 2015-03-10 17:36:17 -07:00
parent 61cd2a7543
commit 32aee67c4f
3 changed files with 11 additions and 7 deletions

View File

@ -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.
for ([""] of [[""]]) { }
~~
!!! error TS2364: Invalid left-hand side of assignment expression.

View File

@ -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];
}

View File

@ -1 +1 @@
for ([""] of []) { }
for ([""] of [[""]]) { }