Temporarily disallow for-of statements

This commit is contained in:
Jason Freeman
2015-02-18 11:14:58 -08:00
parent 7cb2a64350
commit 8558d642f3
49 changed files with 160 additions and 154 deletions

View File

@@ -10786,6 +10786,8 @@ module ts {
}
function checkGrammarForOfStatement(forOfStatement: ForOfStatement): boolean {
// Temporarily disallow for-of statements until type check work is complete.
return grammarErrorOnFirstToken(forOfStatement, Diagnostics.For_of_statements_are_not_currently_supported);
if (checkGrammarForInOrForOfStatement(forOfStatement)) {
return true;
}

View File

@@ -316,7 +316,7 @@ module ts {
Property_0_does_not_exist_on_const_enum_1: { code: 2475, category: DiagnosticCategory.Error, key: "Property '{0}' does not exist on 'const' enum '{1}'." },
let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations: { code: 2476, category: DiagnosticCategory.Error, key: "'let' is not allowed to be used as a name in 'let' or 'const' declarations." },
Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1: { code: 2477, category: DiagnosticCategory.Error, key: "Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'." },
For_of_statements_are_only_available_when_targeting_ECMAScript_6_or_higher: { code: 2482, category: DiagnosticCategory.Error, key: "For-of statements are only available when targeting ECMAScript 6 or higher" },
For_of_statements_are_only_available_when_targeting_ECMAScript_6_or_higher: { code: 2482, category: DiagnosticCategory.Error, key: "For...of statements are only available when targeting ECMAScript 6 or higher." },
The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation: { code: 2483, category: DiagnosticCategory.Error, key: "The left-hand side of a 'for...of' statement cannot use a type annotation." },
Import_declaration_0_is_using_private_name_1: { code: 4000, category: DiagnosticCategory.Error, key: "Import declaration '{0}' is using private name '{1}'." },
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported class has or is using private name '{1}'." },
@@ -463,5 +463,6 @@ module ts {
yield_expressions_are_not_currently_supported: { code: 9000, category: DiagnosticCategory.Error, key: "'yield' expressions are not currently supported." },
Generators_are_not_currently_supported: { code: 9001, category: DiagnosticCategory.Error, key: "Generators are not currently supported." },
The_arguments_object_cannot_be_referenced_in_an_arrow_function_Consider_using_a_standard_function_expression: { code: 9002, category: DiagnosticCategory.Error, key: "The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression." },
For_of_statements_are_not_currently_supported: { code: 9003, category: DiagnosticCategory.Error, key: "For...of statements are not currently supported." },
};
}

View File

@@ -1256,7 +1256,7 @@
"category": "Error",
"code": 2477
},
"For-of statements are only available when targeting ECMAScript 6 or higher": {
"For...of statements are only available when targeting ECMAScript 6 or higher.": {
"category": "Error",
"code": 2482
},
@@ -1845,5 +1845,9 @@
"The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.": {
"category": "Error",
"code": 9002
},
"For...of statements are not currently supported.": {
"category": "Error",
"code": 9003
}
}

View File

@@ -1,8 +1,8 @@
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement1.d.ts(1,1): error TS1036: Statements are not allowed in ambient contexts.
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement1.d.ts(1,1): error TS9003: For...of statements are not currently supported.
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement1.d.ts (1 errors) ====
for (var i of e) {
~~~
!!! error TS1036: Statements are not allowed in ambient contexts.
!!! error TS9003: For...of statements are not currently supported.
}

View File

@@ -1,11 +1,8 @@
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement10.ts(1,1): error TS2482: For-of statements are only available when targeting ECMAScript 6 or higher
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement10.ts(1,6): error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher.
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement10.ts(1,1): error TS9003: For...of statements are not currently supported.
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement10.ts (2 errors) ====
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement10.ts (1 errors) ====
for (const v of X) {
~~~
!!! error TS2482: For-of statements are only available when targeting ECMAScript 6 or higher
~~~~~
!!! error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher.
!!! error TS9003: For...of statements are not currently supported.
}

View File

@@ -1,11 +1,8 @@
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement11.ts(1,1): error TS2482: For-of statements are only available when targeting ECMAScript 6 or higher
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement11.ts(1,6): error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher.
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement11.ts(1,1): error TS9003: For...of statements are not currently supported.
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement11.ts (2 errors) ====
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement11.ts (1 errors) ====
for (const [a, b] of X) {
~~~
!!! error TS2482: For-of statements are only available when targeting ECMAScript 6 or higher
~~~~~
!!! error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher.
!!! error TS9003: For...of statements are not currently supported.
}

View File

@@ -1,11 +1,8 @@
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement12.ts(1,1): error TS2482: For-of statements are only available when targeting ECMAScript 6 or higher
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement12.ts(1,6): error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher.
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement12.ts(1,1): error TS9003: For...of statements are not currently supported.
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement12.ts (2 errors) ====
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement12.ts (1 errors) ====
for (const {a, b} of X) {
~~~
!!! error TS2482: For-of statements are only available when targeting ECMAScript 6 or higher
~~~~~
!!! error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher.
!!! error TS9003: For...of statements are not currently supported.
}

View File

@@ -1,11 +1,8 @@
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement13.ts(1,1): error TS2482: For-of statements are only available when targeting ECMAScript 6 or higher
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement13.ts(1,6): error TS1153: 'let' declarations are only available when targeting ECMAScript 6 and higher.
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement13.ts(1,1): error TS9003: For...of statements are not currently supported.
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement13.ts (2 errors) ====
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement13.ts (1 errors) ====
for (let {a, b} of X) {
~~~
!!! error TS2482: For-of statements are only available when targeting ECMAScript 6 or higher
~~~
!!! error TS1153: 'let' declarations are only available when targeting ECMAScript 6 and higher.
!!! error TS9003: For...of statements are not currently supported.
}

View File

@@ -1,11 +1,8 @@
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement14.ts(1,1): error TS2482: For-of statements are only available when targeting ECMAScript 6 or higher
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement14.ts(1,6): error TS1153: 'let' declarations are only available when targeting ECMAScript 6 and higher.
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement14.ts(1,1): error TS9003: For...of statements are not currently supported.
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement14.ts (2 errors) ====
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement14.ts (1 errors) ====
for (let [a, b] of X) {
~~~
!!! error TS2482: For-of statements are only available when targeting ECMAScript 6 or higher
~~~
!!! error TS1153: 'let' declarations are only available when targeting ECMAScript 6 and higher.
!!! error TS9003: For...of statements are not currently supported.
}

View File

@@ -1,8 +1,8 @@
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement15.ts(1,1): error TS2482: For-of statements are only available when targeting ECMAScript 6 or higher
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement15.ts(1,1): error TS9003: For...of statements are not currently supported.
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement15.ts (1 errors) ====
for (var [a, b] of X) {
~~~
!!! error TS2482: For-of statements are only available when targeting ECMAScript 6 or higher
!!! error TS9003: For...of statements are not currently supported.
}

View File

@@ -1,8 +1,8 @@
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement16.ts(1,1): error TS2482: For-of statements are only available when targeting ECMAScript 6 or higher
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement16.ts(1,1): error TS9003: For...of statements are not currently supported.
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement16.ts (1 errors) ====
for (var {a, b} of X) {
~~~
!!! error TS2482: For-of statements are only available when targeting ECMAScript 6 or higher
!!! error TS9003: For...of statements are not currently supported.
}

View File

@@ -1,7 +1,7 @@
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement18.ts(1,1): error TS2482: For-of statements are only available when targeting ECMAScript 6 or higher
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement18.ts(1,1): error TS9003: For...of statements are not currently supported.
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement18.ts (1 errors) ====
for (var of of of) { }
~~~
!!! error TS2482: For-of statements are only available when targeting ECMAScript 6 or higher
!!! error TS9003: For...of statements are not currently supported.

View File

@@ -1,11 +1,8 @@
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement2.ts(1,1): error TS2482: For-of statements are only available when targeting ECMAScript 6 or higher
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement2.ts(1,9): error TS1123: Variable declaration list cannot be empty.
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement2.ts(1,1): error TS9003: For...of statements are not currently supported.
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement2.ts (2 errors) ====
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement2.ts (1 errors) ====
for (var of X) {
~~~
!!! error TS2482: For-of statements are only available when targeting ECMAScript 6 or higher
!!! error TS1123: Variable declaration list cannot be empty.
!!! error TS9003: For...of statements are not currently supported.
}

View File

@@ -1,10 +1,7 @@
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement21.ts(1,1): error TS2482: For-of statements are only available when targeting ECMAScript 6 or higher
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement21.ts(1,9): error TS1123: Variable declaration list cannot be empty.
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement21.ts(1,1): error TS9003: For...of statements are not currently supported.
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement21.ts (2 errors) ====
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement21.ts (1 errors) ====
for (var of of) { }
~~~
!!! error TS2482: For-of statements are only available when targeting ECMAScript 6 or higher
!!! error TS1123: Variable declaration list cannot be empty.
!!! error TS9003: For...of statements are not currently supported.

View File

@@ -1,8 +1,8 @@
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement3.ts(1,13): error TS1188: Only a single variable declaration is allowed in a 'for...of' statement.
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement3.ts(1,1): error TS9003: For...of statements are not currently supported.
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement3.ts (1 errors) ====
for (var a, b of X) {
~
!!! error TS1188: Only a single variable declaration is allowed in a 'for...of' statement.
~~~
!!! error TS9003: For...of statements are not currently supported.
}

View File

@@ -1,8 +1,8 @@
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement4.ts(1,10): error TS1190: The variable declaration of a 'for...of' statement cannot have an initializer.
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement4.ts(1,1): error TS9003: For...of statements are not currently supported.
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement4.ts (1 errors) ====
for (var a = 1 of X) {
~
!!! error TS1190: The variable declaration of a 'for...of' statement cannot have an initializer.
~~~
!!! error TS9003: For...of statements are not currently supported.
}

View File

@@ -1,8 +1,8 @@
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement5.ts(1,10): error TS2483: The left-hand side of a 'for...of' statement cannot use a type annotation.
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement5.ts(1,1): error TS9003: For...of statements are not currently supported.
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement5.ts (1 errors) ====
for (var a: number of X) {
~
!!! error TS2483: The left-hand side of a 'for...of' statement cannot use a type annotation.
~~~
!!! error TS9003: For...of statements are not currently supported.
}

View File

@@ -1,8 +1,8 @@
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement6.ts(1,17): error TS1188: Only a single variable declaration is allowed in a 'for...of' statement.
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement6.ts(1,1): error TS9003: For...of statements are not currently supported.
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement6.ts (1 errors) ====
for (var a = 1, b = 2 of X) {
~
!!! error TS1188: Only a single variable declaration is allowed in a 'for...of' statement.
~~~
!!! error TS9003: For...of statements are not currently supported.
}

View File

@@ -1,8 +1,8 @@
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement7.ts(1,25): error TS1188: Only a single variable declaration is allowed in a 'for...of' statement.
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement7.ts(1,1): error TS9003: For...of statements are not currently supported.
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement7.ts (1 errors) ====
for (var a: number = 1, b: string = "" of X) {
~
!!! error TS1188: Only a single variable declaration is allowed in a 'for...of' statement.
~~~
!!! error TS9003: For...of statements are not currently supported.
}

View File

@@ -1,8 +1,8 @@
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement8.ts(1,1): error TS2482: For-of statements are only available when targeting ECMAScript 6 or higher
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement8.ts(1,1): error TS9003: For...of statements are not currently supported.
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement8.ts (1 errors) ====
for (var v of X) {
~~~
!!! error TS2482: For-of statements are only available when targeting ECMAScript 6 or higher
!!! error TS9003: For...of statements are not currently supported.
}

View File

@@ -1,11 +1,8 @@
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement9.ts(1,1): error TS2482: For-of statements are only available when targeting ECMAScript 6 or higher
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement9.ts(1,6): error TS1153: 'let' declarations are only available when targeting ECMAScript 6 and higher.
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement9.ts(1,1): error TS9003: For...of statements are not currently supported.
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement9.ts (2 errors) ====
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement9.ts (1 errors) ====
for (let v of X) {
~~~
!!! error TS2482: For-of statements are only available when targeting ECMAScript 6 or higher
~~~
!!! error TS1153: 'let' declarations are only available when targeting ECMAScript 6 and higher.
!!! error TS9003: For...of statements are not currently supported.
}

View File

@@ -1,8 +1,8 @@
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement1.d.ts(1,1): error TS1036: Statements are not allowed in ambient contexts.
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement1.d.ts(1,1): error TS9003: For...of statements are not currently supported.
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement1.d.ts (1 errors) ====
for (var i of e) {
~~~
!!! error TS1036: Statements are not allowed in ambient contexts.
!!! error TS9003: For...of statements are not currently supported.
}

View File

@@ -0,0 +1,8 @@
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement10.ts(1,1): error TS9003: For...of statements are not currently supported.
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement10.ts (1 errors) ====
for (const v of X) {
~~~
!!! error TS9003: For...of statements are not currently supported.
}

View File

@@ -1,5 +0,0 @@
=== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement10.ts ===
for (const v of X) {
>v : any
>X : unknown
}

View File

@@ -0,0 +1,8 @@
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement11.ts(1,1): error TS9003: For...of statements are not currently supported.
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement11.ts (1 errors) ====
for (const [a, b] of X) {
~~~
!!! error TS9003: For...of statements are not currently supported.
}

View File

@@ -1,6 +0,0 @@
=== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement11.ts ===
for (const [a, b] of X) {
>a : any
>b : any
>X : unknown
}

View File

@@ -0,0 +1,8 @@
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement12.ts(1,1): error TS9003: For...of statements are not currently supported.
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement12.ts (1 errors) ====
for (const {a, b} of X) {
~~~
!!! error TS9003: For...of statements are not currently supported.
}

View File

@@ -1,6 +0,0 @@
=== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement12.ts ===
for (const {a, b} of X) {
>a : any
>b : any
>X : unknown
}

View File

@@ -0,0 +1,8 @@
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement13.ts(1,1): error TS9003: For...of statements are not currently supported.
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement13.ts (1 errors) ====
for (let {a, b} of X) {
~~~
!!! error TS9003: For...of statements are not currently supported.
}

View File

@@ -1,6 +0,0 @@
=== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement13.ts ===
for (let {a, b} of X) {
>a : any
>b : any
>X : unknown
}

View File

@@ -0,0 +1,8 @@
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement14.ts(1,1): error TS9003: For...of statements are not currently supported.
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement14.ts (1 errors) ====
for (let [a, b] of X) {
~~~
!!! error TS9003: For...of statements are not currently supported.
}

View File

@@ -1,6 +0,0 @@
=== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement14.ts ===
for (let [a, b] of X) {
>a : any
>b : any
>X : unknown
}

View File

@@ -0,0 +1,8 @@
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement15.ts(1,1): error TS9003: For...of statements are not currently supported.
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement15.ts (1 errors) ====
for (var [a, b] of X) {
~~~
!!! error TS9003: For...of statements are not currently supported.
}

View File

@@ -1,6 +0,0 @@
=== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement15.ts ===
for (var [a, b] of X) {
>a : any
>b : any
>X : unknown
}

View File

@@ -0,0 +1,8 @@
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement16.ts(1,1): error TS9003: For...of statements are not currently supported.
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement16.ts (1 errors) ====
for (var {a, b} of X) {
~~~
!!! error TS9003: For...of statements are not currently supported.
}

View File

@@ -1,6 +0,0 @@
=== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement16.ts ===
for (var {a, b} of X) {
>a : any
>b : any
>X : unknown
}

View File

@@ -0,0 +1,7 @@
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement18.ts(1,1): error TS9003: For...of statements are not currently supported.
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement18.ts (1 errors) ====
for (var of of of) { }
~~~
!!! error TS9003: For...of statements are not currently supported.

View File

@@ -1,5 +0,0 @@
=== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement18.ts ===
for (var of of of) { }
>of : any
>of : any

View File

@@ -1,8 +1,8 @@
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement2.ts(1,9): error TS1123: Variable declaration list cannot be empty.
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement2.ts(1,1): error TS9003: For...of statements are not currently supported.
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement2.ts (1 errors) ====
for (var of X) {
!!! error TS1123: Variable declaration list cannot be empty.
~~~
!!! error TS9003: For...of statements are not currently supported.
}

View File

@@ -1,7 +1,7 @@
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement21.ts(1,9): error TS1123: Variable declaration list cannot be empty.
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement21.ts(1,1): error TS9003: For...of statements are not currently supported.
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement21.ts (1 errors) ====
for (var of of) { }
!!! error TS1123: Variable declaration list cannot be empty.
~~~
!!! error TS9003: For...of statements are not currently supported.

View File

@@ -1,8 +1,8 @@
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement3.ts(1,13): error TS1188: Only a single variable declaration is allowed in a 'for...of' statement.
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement3.ts(1,1): error TS9003: For...of statements are not currently supported.
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement3.ts (1 errors) ====
for (var a, b of X) {
~
!!! error TS1188: Only a single variable declaration is allowed in a 'for...of' statement.
~~~
!!! error TS9003: For...of statements are not currently supported.
}

View File

@@ -1,8 +1,8 @@
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement4.ts(1,10): error TS1190: The variable declaration of a 'for...of' statement cannot have an initializer.
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement4.ts(1,1): error TS9003: For...of statements are not currently supported.
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement4.ts (1 errors) ====
for (var a = 1 of X) {
~
!!! error TS1190: The variable declaration of a 'for...of' statement cannot have an initializer.
~~~
!!! error TS9003: For...of statements are not currently supported.
}

View File

@@ -1,8 +1,8 @@
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement5.ts(1,10): error TS2483: The left-hand side of a 'for...of' statement cannot use a type annotation.
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement5.ts(1,1): error TS9003: For...of statements are not currently supported.
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement5.ts (1 errors) ====
for (var a: number of X) {
~
!!! error TS2483: The left-hand side of a 'for...of' statement cannot use a type annotation.
~~~
!!! error TS9003: For...of statements are not currently supported.
}

View File

@@ -1,8 +1,8 @@
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement6.ts(1,17): error TS1188: Only a single variable declaration is allowed in a 'for...of' statement.
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement6.ts(1,1): error TS9003: For...of statements are not currently supported.
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement6.ts (1 errors) ====
for (var a = 1, b = 2 of X) {
~
!!! error TS1188: Only a single variable declaration is allowed in a 'for...of' statement.
~~~
!!! error TS9003: For...of statements are not currently supported.
}

View File

@@ -1,8 +1,8 @@
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement7.ts(1,25): error TS1188: Only a single variable declaration is allowed in a 'for...of' statement.
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement7.ts(1,1): error TS9003: For...of statements are not currently supported.
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement7.ts (1 errors) ====
for (var a: number = 1, b: string = "" of X) {
~
!!! error TS1188: Only a single variable declaration is allowed in a 'for...of' statement.
~~~
!!! error TS9003: For...of statements are not currently supported.
}

View File

@@ -0,0 +1,8 @@
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement8.ts(1,1): error TS9003: For...of statements are not currently supported.
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement8.ts (1 errors) ====
for (var v of X) {
~~~
!!! error TS9003: For...of statements are not currently supported.
}

View File

@@ -1,5 +0,0 @@
=== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement8.ts ===
for (var v of X) {
>v : any
>X : unknown
}

View File

@@ -0,0 +1,8 @@
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement9.ts(1,1): error TS9003: For...of statements are not currently supported.
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement9.ts (1 errors) ====
for (let v of X) {
~~~
!!! error TS9003: For...of statements are not currently supported.
}

View File

@@ -1,5 +0,0 @@
=== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement9.ts ===
for (let v of X) {
>v : any
>X : unknown
}