mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge pull request #2207 from Microsoft/for-ofES5
Emit 'for...of' statements in ES3/ES5
This commit is contained in:
@@ -10912,6 +10912,8 @@ module ts {
|
||||
}
|
||||
|
||||
function isUnknownIdentifier(location: Node, name: string): boolean {
|
||||
// Do not call resolveName on a synthesized node!
|
||||
Debug.assert(!nodeIsSynthesized(location), "isUnknownIdentifier called with a synthesized location");
|
||||
return !resolveName(location, name, SymbolFlags.Value, /*nodeNotFoundMessage*/ undefined, /*nameArg*/ undefined) &&
|
||||
!hasProperty(getGeneratedNamesForSourceFile(getSourceFile(location)), name);
|
||||
}
|
||||
|
||||
+195
-14
@@ -1641,12 +1641,13 @@ module ts {
|
||||
}
|
||||
|
||||
if (root) {
|
||||
emit(root);
|
||||
// Do not call emit directly. It does not set the currentSourceFile.
|
||||
emitSourceFile(root);
|
||||
}
|
||||
else {
|
||||
forEach(host.getSourceFiles(), sourceFile => {
|
||||
if (!isExternalModuleOrDeclarationFile(sourceFile)) {
|
||||
emit(sourceFile);
|
||||
emitSourceFile(sourceFile);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1655,6 +1656,11 @@ module ts {
|
||||
writeEmittedFiles(writer.getText(), /*writeByteOrderMark*/ compilerOptions.emitBOM);
|
||||
return;
|
||||
|
||||
function emitSourceFile(sourceFile: SourceFile): void {
|
||||
currentSourceFile = sourceFile;
|
||||
emit(sourceFile);
|
||||
}
|
||||
|
||||
// enters the new lexical environment
|
||||
// return value should be passed to matching call to exitNameScope.
|
||||
function enterNameScope(): boolean {
|
||||
@@ -1686,7 +1692,11 @@ module ts {
|
||||
else {
|
||||
name = generateUniqueName(baseName, n => isExistingName(location, n));
|
||||
}
|
||||
|
||||
|
||||
return recordNameInCurrentScope(name);
|
||||
}
|
||||
|
||||
function recordNameInCurrentScope(name: string): string {
|
||||
if (!currentScopeNames) {
|
||||
currentScopeNames = {};
|
||||
}
|
||||
@@ -2063,6 +2073,9 @@ module ts {
|
||||
|
||||
function emitNodeWithSourceMap(node: Node) {
|
||||
if (node) {
|
||||
if (nodeIsSynthesized(node)) {
|
||||
return emitNodeWithoutSourceMap(node);
|
||||
}
|
||||
if (node.kind != SyntaxKind.SourceFile) {
|
||||
recordEmitNodeStartSpan(node);
|
||||
emitNodeWithoutSourceMap(node);
|
||||
@@ -2107,9 +2120,15 @@ module ts {
|
||||
break;
|
||||
}
|
||||
// _a .. _h, _j ... _z, _0, _1, ...
|
||||
// Note that _i is skipped
|
||||
name = "_" + (tempCount < 25 ? String.fromCharCode(tempCount + (tempCount < 8 ? 0 : 1) + CharacterCodes.a) : tempCount - 25);
|
||||
tempCount++;
|
||||
}
|
||||
|
||||
// This is necessary so that a name generated via renameNonTopLevelLetAndConst will see the name
|
||||
// we just generated.
|
||||
recordNameInCurrentScope(name);
|
||||
|
||||
var result = <Identifier>createSynthesizedNode(SyntaxKind.Identifier);
|
||||
result.text = name;
|
||||
return result;
|
||||
@@ -2891,6 +2910,12 @@ module ts {
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
function createExpressionStatement(expression: Expression): ExpressionStatement {
|
||||
var result = <ExpressionStatement>createSynthesizedNode(SyntaxKind.ExpressionStatement);
|
||||
result.expression = expression;
|
||||
return result;
|
||||
}
|
||||
|
||||
function createMemberAccessForPropertyName(expression: LeftHandSideExpression, memberName: DeclarationName): PropertyAccessExpression | ElementAccessExpression {
|
||||
if (memberName.kind === SyntaxKind.Identifier) {
|
||||
@@ -3303,7 +3328,7 @@ module ts {
|
||||
function emitBinaryExpression(node: BinaryExpression) {
|
||||
if (languageVersion < ScriptTarget.ES6 && node.operatorToken.kind === SyntaxKind.EqualsToken &&
|
||||
(node.left.kind === SyntaxKind.ObjectLiteralExpression || node.left.kind === SyntaxKind.ArrayLiteralExpression)) {
|
||||
emitDestructuring(node);
|
||||
emitDestructuring(node, node.parent.kind === SyntaxKind.ExpressionStatement);
|
||||
}
|
||||
else {
|
||||
emit(node.left);
|
||||
@@ -3486,6 +3511,10 @@ module ts {
|
||||
}
|
||||
|
||||
function emitForInOrForOfStatement(node: ForInStatement | ForOfStatement) {
|
||||
if (languageVersion < ScriptTarget.ES6 && node.kind === SyntaxKind.ForOfStatement) {
|
||||
return emitDownLevelForOfStatement(node);
|
||||
}
|
||||
|
||||
var endPos = emitToken(SyntaxKind.ForKeyword, node.pos);
|
||||
write(" ");
|
||||
endPos = emitToken(SyntaxKind.OpenParenToken, endPos);
|
||||
@@ -3512,6 +3541,146 @@ module ts {
|
||||
emitToken(SyntaxKind.CloseParenToken, node.expression.end);
|
||||
emitEmbeddedStatement(node.statement);
|
||||
}
|
||||
|
||||
function emitDownLevelForOfStatement(node: ForOfStatement) {
|
||||
// The following ES6 code:
|
||||
//
|
||||
// for (var v of expr) { }
|
||||
//
|
||||
// should be emitted as
|
||||
//
|
||||
// for (var _i = 0, _a = expr; _i < _a.length; _i++) {
|
||||
// var v = _a[_i];
|
||||
// }
|
||||
//
|
||||
// where _a and _i are temps emitted to capture the RHS and the counter,
|
||||
// respectively.
|
||||
// When the left hand side is an expression instead of a var declaration,
|
||||
// the "var v" is not emitted.
|
||||
// When the left hand side is a let/const, the v is renamed if there is
|
||||
// another v in scope.
|
||||
// Note that all assignments to the LHS are emitted in the body, including
|
||||
// all destructuring.
|
||||
// Note also that because an extra statement is needed to assign to the LHS,
|
||||
// for-of bodies are always emitted as blocks.
|
||||
|
||||
var endPos = emitToken(SyntaxKind.ForKeyword, node.pos);
|
||||
write(" ");
|
||||
endPos = emitToken(SyntaxKind.OpenParenToken, endPos);
|
||||
|
||||
// Do not emit the LHS var declaration yet, because it might contain destructuring.
|
||||
|
||||
// Do not call recordTempDeclaration because we are declaring the temps
|
||||
// right here. Recording means they will be declared later.
|
||||
// In the case where the user wrote an identifier as the RHS, like this:
|
||||
//
|
||||
// for (var v of arr) { }
|
||||
//
|
||||
// we don't want to emit a temporary variable for the RHS, just use it directly.
|
||||
var rhsIsIdentifier = node.expression.kind === SyntaxKind.Identifier;
|
||||
var counter = createTempVariable(node, /*forLoopVariable*/ true);
|
||||
var rhsReference = rhsIsIdentifier ? <Identifier>node.expression : createTempVariable(node, /*forLoopVariable*/ false);
|
||||
|
||||
// This is the var keyword for the counter and rhsReference. The var keyword for
|
||||
// the LHS will be emitted inside the body.
|
||||
emitStart(node.expression);
|
||||
write("var ");
|
||||
|
||||
// _i = 0
|
||||
emitNodeWithoutSourceMap(counter);
|
||||
write(" = 0");
|
||||
emitEnd(node.expression);
|
||||
|
||||
if (!rhsIsIdentifier) {
|
||||
// , _a = expr
|
||||
write(", ");
|
||||
emitStart(node.expression);
|
||||
emitNodeWithoutSourceMap(rhsReference);
|
||||
write(" = ");
|
||||
emitNodeWithoutSourceMap(node.expression);
|
||||
emitEnd(node.expression);
|
||||
}
|
||||
write("; ");
|
||||
|
||||
// _i < _a.length;
|
||||
emitStart(node.initializer);
|
||||
emitNodeWithoutSourceMap(counter);
|
||||
write(" < ");
|
||||
emitNodeWithoutSourceMap(rhsReference);
|
||||
write(".length");
|
||||
emitEnd(node.initializer);
|
||||
write("; ");
|
||||
|
||||
// _i++)
|
||||
emitStart(node.initializer);
|
||||
emitNodeWithoutSourceMap(counter);
|
||||
write("++");
|
||||
emitEnd(node.initializer);
|
||||
emitToken(SyntaxKind.CloseParenToken, node.expression.end);
|
||||
|
||||
// Body
|
||||
write(" {");
|
||||
writeLine();
|
||||
increaseIndent();
|
||||
|
||||
// Initialize LHS
|
||||
// var v = _a[_i];
|
||||
var rhsIterationValue = createElementAccessExpression(rhsReference, counter);
|
||||
emitStart(node.initializer);
|
||||
if (node.initializer.kind === SyntaxKind.VariableDeclarationList) {
|
||||
write("var ");
|
||||
var variableDeclarationList = <VariableDeclarationList>node.initializer;
|
||||
if (variableDeclarationList.declarations.length > 0) {
|
||||
var declaration = variableDeclarationList.declarations[0];
|
||||
if (isBindingPattern(declaration.name)) {
|
||||
// This works whether the declaration is a var, let, or const.
|
||||
// It will use rhsIterationValue _a[_i] as the initializer.
|
||||
emitDestructuring(declaration, /*isAssignmentExpressionStatement*/ false, rhsIterationValue);
|
||||
}
|
||||
else {
|
||||
// The following call does not include the initializer, so we have
|
||||
// to emit it separately.
|
||||
emitNodeWithoutSourceMap(declaration);
|
||||
write(" = ");
|
||||
emitNodeWithoutSourceMap(rhsIterationValue);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// It's an empty declaration list. This can only happen in an error case, if the user wrote
|
||||
// for (var of []) {}
|
||||
emitNodeWithoutSourceMap(createTempVariable(node, /*forLoopVariable*/ false));
|
||||
write(" = ");
|
||||
emitNodeWithoutSourceMap(rhsIterationValue);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Initializer is an expression. Emit the expression in the body, so that it's
|
||||
// evaluated on every iteration.
|
||||
var assignmentExpression = createBinaryExpression(<Expression>node.initializer, SyntaxKind.EqualsToken, rhsIterationValue, /*startsOnNewLine*/ false);
|
||||
if (node.initializer.kind === SyntaxKind.ArrayLiteralExpression || node.initializer.kind === SyntaxKind.ObjectLiteralExpression) {
|
||||
// This is a destructuring pattern, so call emitDestructuring instead of emit. Calling emit will not work, because it will cause
|
||||
// the BinaryExpression to be passed in instead of the expression statement, which will cause emitDestructuring to crash.
|
||||
emitDestructuring(assignmentExpression, /*isAssignmentExpressionStatement*/ true, /*value*/ undefined, /*locationForCheckingExistingName*/ node);
|
||||
}
|
||||
else {
|
||||
emitNodeWithoutSourceMap(assignmentExpression);
|
||||
}
|
||||
}
|
||||
emitEnd(node.initializer);
|
||||
write(";");
|
||||
|
||||
if (node.statement.kind === SyntaxKind.Block) {
|
||||
emitLines((<Block>node.statement).statements);
|
||||
}
|
||||
else {
|
||||
writeLine();
|
||||
emit(node.statement);
|
||||
}
|
||||
|
||||
writeLine();
|
||||
decreaseIndent();
|
||||
write("}");
|
||||
}
|
||||
|
||||
function emitBreakOrContinueStatement(node: BreakOrContinueStatement) {
|
||||
emitToken(node.kind === SyntaxKind.BreakStatement ? SyntaxKind.BreakKeyword : SyntaxKind.ContinueKeyword, node.pos);
|
||||
@@ -3668,7 +3837,16 @@ module ts {
|
||||
}
|
||||
}
|
||||
|
||||
function emitDestructuring(root: BinaryExpression | VariableDeclaration | ParameterDeclaration, value?: Expression) {
|
||||
/**
|
||||
* If the root has a chance of being a synthesized node, callers should also pass a value for
|
||||
* lowestNonSynthesizedAncestor. This should be an ancestor of root, it should not be synthesized,
|
||||
* and there should not be a lower ancestor that introduces a scope. This node will be used as the
|
||||
* location for ensuring that temporary names are unique.
|
||||
*/
|
||||
function emitDestructuring(root: BinaryExpression | VariableDeclaration | ParameterDeclaration,
|
||||
isAssignmentExpressionStatement: boolean,
|
||||
value?: Expression,
|
||||
lowestNonSynthesizedAncestor?: Node) {
|
||||
var emitCount = 0;
|
||||
// An exported declaration is actually emitted as an assignment (to a property on the module object), so
|
||||
// temporary variables in an exported declaration need to have real declarations elsewhere
|
||||
@@ -3677,6 +3855,7 @@ module ts {
|
||||
emitAssignmentExpression(<BinaryExpression>root);
|
||||
}
|
||||
else {
|
||||
Debug.assert(!isAssignmentExpressionStatement);
|
||||
emitBindingElement(<BindingElement>root, value);
|
||||
}
|
||||
|
||||
@@ -3698,7 +3877,10 @@ module ts {
|
||||
|
||||
function ensureIdentifier(expr: Expression): Expression {
|
||||
if (expr.kind !== SyntaxKind.Identifier) {
|
||||
var identifier = createTempVariable(root);
|
||||
// In case the root is a synthesized node, we need to pass lowestNonSynthesizedAncestor
|
||||
// as the location for determining uniqueness of the variable we are about to
|
||||
// generate.
|
||||
var identifier = createTempVariable(lowestNonSynthesizedAncestor || root);
|
||||
if (!isDeclaration) {
|
||||
recordTempDeclaration(identifier);
|
||||
}
|
||||
@@ -3819,7 +4001,7 @@ module ts {
|
||||
function emitAssignmentExpression(root: BinaryExpression) {
|
||||
var target = root.left;
|
||||
var value = root.right;
|
||||
if (root.parent.kind === SyntaxKind.ExpressionStatement) {
|
||||
if (isAssignmentExpressionStatement) {
|
||||
emitDestructuringAssignment(target, value);
|
||||
}
|
||||
else {
|
||||
@@ -3884,7 +4066,7 @@ module ts {
|
||||
function emitVariableDeclaration(node: VariableDeclaration) {
|
||||
if (isBindingPattern(node.name)) {
|
||||
if (languageVersion < ScriptTarget.ES6) {
|
||||
emitDestructuring(node);
|
||||
emitDestructuring(node, /*isAssignmentExpressionStatement*/ false);
|
||||
}
|
||||
else {
|
||||
emit(node.name);
|
||||
@@ -3892,7 +4074,7 @@ module ts {
|
||||
}
|
||||
}
|
||||
else {
|
||||
var isLet = renameNonTopLevelLetAndConst(<Identifier>node.name);
|
||||
renameNonTopLevelLetAndConst(<Identifier>node.name);
|
||||
emitModuleMemberName(node);
|
||||
|
||||
var initializer = node.initializer;
|
||||
@@ -4047,7 +4229,7 @@ module ts {
|
||||
if (isBindingPattern(p.name)) {
|
||||
writeLine();
|
||||
write("var ");
|
||||
emitDestructuring(p, tempParameters[tempIndex]);
|
||||
emitDestructuring(p, /*isAssignmentExpressionStatement*/ false, tempParameters[tempIndex]);
|
||||
write(";");
|
||||
tempIndex++;
|
||||
}
|
||||
@@ -4385,7 +4567,7 @@ module ts {
|
||||
}
|
||||
|
||||
function emitMemberAccessForPropertyName(memberName: DeclarationName) {
|
||||
// TODO: (jfreeman,drosen): comment on why this is emitNode instead of emit here.
|
||||
// TODO: (jfreeman,drosen): comment on why this is emitNodeWithoutSourceMap instead of emit here.
|
||||
if (memberName.kind === SyntaxKind.StringLiteral || memberName.kind === SyntaxKind.NumericLiteral) {
|
||||
write("[");
|
||||
emitNodeWithoutSourceMap(memberName);
|
||||
@@ -5112,8 +5294,7 @@ module ts {
|
||||
return statements.length;
|
||||
}
|
||||
|
||||
function emitSourceFile(node: SourceFile) {
|
||||
currentSourceFile = node;
|
||||
function emitSourceFileNode(node: SourceFile) {
|
||||
// Start new file on new line
|
||||
writeLine();
|
||||
emitDetachedComments(node);
|
||||
@@ -5368,7 +5549,7 @@ module ts {
|
||||
case SyntaxKind.ExportDeclaration:
|
||||
return emitExportDeclaration(<ExportDeclaration>node);
|
||||
case SyntaxKind.SourceFile:
|
||||
return emitSourceFile(<SourceFile>node);
|
||||
return emitSourceFileNode(<SourceFile>node);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of1.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of1.ts (1 errors) ====
|
||||
for (var v of ['a', 'b', 'c']) {
|
||||
~~~
|
||||
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
console.log(v);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
//// [ES5For-of1.ts]
|
||||
for (var v of ['a', 'b', 'c']) {
|
||||
console.log(v);
|
||||
}
|
||||
|
||||
//// [ES5For-of1.js]
|
||||
for (var _i = 0, _a = [
|
||||
'a',
|
||||
'b',
|
||||
'c'
|
||||
]; _i < _a.length; _i++) {
|
||||
var v = _a[_i];
|
||||
console.log(v);
|
||||
}
|
||||
//# sourceMappingURL=ES5For-of1.js.map
|
||||
@@ -0,0 +1,2 @@
|
||||
//// [ES5For-of1.js.map]
|
||||
{"version":3,"file":"ES5For-of1.js","sourceRoot":"","sources":["ES5For-of1.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAU,UAAe,EAAf;IAAC,GAAG;IAAE,GAAG;IAAE,GAAG;CAAC,EAAxB,cAAK,EAAL,IAAwB,CAAC;IAAzB,IAAI,CAAC,SAAA;IACN,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAClB"}
|
||||
@@ -0,0 +1,127 @@
|
||||
===================================================================
|
||||
JsFile: ES5For-of1.js
|
||||
mapUrl: ES5For-of1.js.map
|
||||
sourceRoot:
|
||||
sources: ES5For-of1.ts
|
||||
===================================================================
|
||||
-------------------------------------------------------------------
|
||||
emittedFile:tests/cases/conformance/statements/for-ofStatements/ES5For-of1.js
|
||||
sourceFile:ES5For-of1.ts
|
||||
-------------------------------------------------------------------
|
||||
>>>for (var _i = 0, _a = [
|
||||
1 >
|
||||
2 >^^^
|
||||
3 > ^
|
||||
4 > ^
|
||||
5 > ^^^^^^^^^^
|
||||
6 > ^^
|
||||
1 >
|
||||
2 >for
|
||||
3 >
|
||||
4 > (var v of
|
||||
5 > ['a', 'b', 'c']
|
||||
6 >
|
||||
1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
|
||||
2 >Emitted(1, 4) Source(1, 4) + SourceIndex(0)
|
||||
3 >Emitted(1, 5) Source(1, 5) + SourceIndex(0)
|
||||
4 >Emitted(1, 6) Source(1, 15) + SourceIndex(0)
|
||||
5 >Emitted(1, 16) Source(1, 30) + SourceIndex(0)
|
||||
6 >Emitted(1, 18) Source(1, 15) + SourceIndex(0)
|
||||
---
|
||||
>>> 'a',
|
||||
1 >^^^^
|
||||
2 > ^^^
|
||||
3 > ^^->
|
||||
1 >[
|
||||
2 > 'a'
|
||||
1 >Emitted(2, 5) Source(1, 16) + SourceIndex(0)
|
||||
2 >Emitted(2, 8) Source(1, 19) + SourceIndex(0)
|
||||
---
|
||||
>>> 'b',
|
||||
1->^^^^
|
||||
2 > ^^^
|
||||
3 > ^->
|
||||
1->,
|
||||
2 > 'b'
|
||||
1->Emitted(3, 5) Source(1, 21) + SourceIndex(0)
|
||||
2 >Emitted(3, 8) Source(1, 24) + SourceIndex(0)
|
||||
---
|
||||
>>> 'c'
|
||||
1->^^^^
|
||||
2 > ^^^
|
||||
3 > ^^^^^^^^^^^^^^^^^^^^->
|
||||
1->,
|
||||
2 > 'c'
|
||||
1->Emitted(4, 5) Source(1, 26) + SourceIndex(0)
|
||||
2 >Emitted(4, 8) Source(1, 29) + SourceIndex(0)
|
||||
---
|
||||
>>>]; _i < _a.length; _i++) {
|
||||
1->^
|
||||
2 > ^^
|
||||
3 > ^^^^^^^^^^^^^^
|
||||
4 > ^^
|
||||
5 > ^^^^
|
||||
6 > ^
|
||||
1->]
|
||||
2 >
|
||||
3 > var v
|
||||
4 >
|
||||
5 > var v of ['a', 'b', 'c']
|
||||
6 > )
|
||||
1->Emitted(5, 2) Source(1, 30) + SourceIndex(0)
|
||||
2 >Emitted(5, 4) Source(1, 6) + SourceIndex(0)
|
||||
3 >Emitted(5, 18) Source(1, 11) + SourceIndex(0)
|
||||
4 >Emitted(5, 20) Source(1, 6) + SourceIndex(0)
|
||||
5 >Emitted(5, 24) Source(1, 30) + SourceIndex(0)
|
||||
6 >Emitted(5, 25) Source(1, 31) + SourceIndex(0)
|
||||
---
|
||||
>>> var v = _a[_i];
|
||||
1 >^^^^
|
||||
2 > ^^^^
|
||||
3 > ^
|
||||
4 > ^^^^^^^^^
|
||||
5 > ^^->
|
||||
1 >
|
||||
2 > var
|
||||
3 > v
|
||||
4 >
|
||||
1 >Emitted(6, 5) Source(1, 6) + SourceIndex(0)
|
||||
2 >Emitted(6, 9) Source(1, 10) + SourceIndex(0)
|
||||
3 >Emitted(6, 10) Source(1, 11) + SourceIndex(0)
|
||||
4 >Emitted(6, 19) Source(1, 11) + SourceIndex(0)
|
||||
---
|
||||
>>> console.log(v);
|
||||
1->^^^^
|
||||
2 > ^^^^^^^
|
||||
3 > ^
|
||||
4 > ^^^
|
||||
5 > ^
|
||||
6 > ^
|
||||
7 > ^
|
||||
8 > ^
|
||||
1-> of ['a', 'b', 'c']) {
|
||||
>
|
||||
2 > console
|
||||
3 > .
|
||||
4 > log
|
||||
5 > (
|
||||
6 > v
|
||||
7 > )
|
||||
8 > ;
|
||||
1->Emitted(7, 5) Source(2, 5) + SourceIndex(0)
|
||||
2 >Emitted(7, 12) Source(2, 12) + SourceIndex(0)
|
||||
3 >Emitted(7, 13) Source(2, 13) + SourceIndex(0)
|
||||
4 >Emitted(7, 16) Source(2, 16) + SourceIndex(0)
|
||||
5 >Emitted(7, 17) Source(2, 17) + SourceIndex(0)
|
||||
6 >Emitted(7, 18) Source(2, 18) + SourceIndex(0)
|
||||
7 >Emitted(7, 19) Source(2, 19) + SourceIndex(0)
|
||||
8 >Emitted(7, 20) Source(2, 20) + SourceIndex(0)
|
||||
---
|
||||
>>>}
|
||||
1 >^
|
||||
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
>}
|
||||
1 >Emitted(8, 2) Source(3, 2) + SourceIndex(0)
|
||||
---
|
||||
>>>//# sourceMappingURL=ES5For-of1.js.map
|
||||
@@ -0,0 +1,13 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of10.ts(4,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of10.ts (1 errors) ====
|
||||
function foo() {
|
||||
return { x: 0 };
|
||||
}
|
||||
for (foo().x of []) {
|
||||
~~~
|
||||
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
for (foo().x of [])
|
||||
var p = foo().x;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
//// [ES5For-of10.ts]
|
||||
function foo() {
|
||||
return { x: 0 };
|
||||
}
|
||||
for (foo().x of []) {
|
||||
for (foo().x of [])
|
||||
var p = foo().x;
|
||||
}
|
||||
|
||||
//// [ES5For-of10.js]
|
||||
function foo() {
|
||||
return {
|
||||
x: 0
|
||||
};
|
||||
}
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
foo().x = _a[_i];
|
||||
for (var _b = 0, _c = []; _b < _c.length; _b++) {
|
||||
foo().x = _c[_b];
|
||||
var p = foo().x;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of11.ts(2,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of11.ts (1 errors) ====
|
||||
var v;
|
||||
for (v of []) { }
|
||||
~~~
|
||||
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
@@ -0,0 +1,9 @@
|
||||
//// [ES5For-of11.ts]
|
||||
var v;
|
||||
for (v of []) { }
|
||||
|
||||
//// [ES5For-of11.js]
|
||||
var v;
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
v = _a[_i];
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of12.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of12.ts (1 errors) ====
|
||||
for ([""] of []) { }
|
||||
~~~
|
||||
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
@@ -0,0 +1,7 @@
|
||||
//// [ES5For-of12.ts]
|
||||
for ([""] of []) { }
|
||||
|
||||
//// [ES5For-of12.js]
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
"" = _a[_i][0];
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of13.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of13.ts (1 errors) ====
|
||||
for (let v of ['a', 'b', 'c']) {
|
||||
~~~
|
||||
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
var x = v;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
//// [ES5For-of13.ts]
|
||||
for (let v of ['a', 'b', 'c']) {
|
||||
var x = v;
|
||||
}
|
||||
|
||||
//// [ES5For-of13.js]
|
||||
for (var _i = 0, _a = [
|
||||
'a',
|
||||
'b',
|
||||
'c'
|
||||
]; _i < _a.length; _i++) {
|
||||
var v = _a[_i];
|
||||
var x = v;
|
||||
}
|
||||
//# sourceMappingURL=ES5For-of13.js.map
|
||||
@@ -0,0 +1,2 @@
|
||||
//// [ES5For-of13.js.map]
|
||||
{"version":3,"file":"ES5For-of13.js","sourceRoot":"","sources":["ES5For-of13.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAU,UAAe,EAAf;IAAC,GAAG;IAAE,GAAG;IAAE,GAAG;CAAC,EAAxB,cAAK,EAAL,IAAwB,CAAC;IAAzB,IAAI,CAAC,SAAA;IACN,IAAI,CAAC,GAAG,CAAC,CAAC;CACb"}
|
||||
@@ -0,0 +1,120 @@
|
||||
===================================================================
|
||||
JsFile: ES5For-of13.js
|
||||
mapUrl: ES5For-of13.js.map
|
||||
sourceRoot:
|
||||
sources: ES5For-of13.ts
|
||||
===================================================================
|
||||
-------------------------------------------------------------------
|
||||
emittedFile:tests/cases/conformance/statements/for-ofStatements/ES5For-of13.js
|
||||
sourceFile:ES5For-of13.ts
|
||||
-------------------------------------------------------------------
|
||||
>>>for (var _i = 0, _a = [
|
||||
1 >
|
||||
2 >^^^
|
||||
3 > ^
|
||||
4 > ^
|
||||
5 > ^^^^^^^^^^
|
||||
6 > ^^
|
||||
1 >
|
||||
2 >for
|
||||
3 >
|
||||
4 > (let v of
|
||||
5 > ['a', 'b', 'c']
|
||||
6 >
|
||||
1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
|
||||
2 >Emitted(1, 4) Source(1, 4) + SourceIndex(0)
|
||||
3 >Emitted(1, 5) Source(1, 5) + SourceIndex(0)
|
||||
4 >Emitted(1, 6) Source(1, 15) + SourceIndex(0)
|
||||
5 >Emitted(1, 16) Source(1, 30) + SourceIndex(0)
|
||||
6 >Emitted(1, 18) Source(1, 15) + SourceIndex(0)
|
||||
---
|
||||
>>> 'a',
|
||||
1 >^^^^
|
||||
2 > ^^^
|
||||
3 > ^^->
|
||||
1 >[
|
||||
2 > 'a'
|
||||
1 >Emitted(2, 5) Source(1, 16) + SourceIndex(0)
|
||||
2 >Emitted(2, 8) Source(1, 19) + SourceIndex(0)
|
||||
---
|
||||
>>> 'b',
|
||||
1->^^^^
|
||||
2 > ^^^
|
||||
3 > ^->
|
||||
1->,
|
||||
2 > 'b'
|
||||
1->Emitted(3, 5) Source(1, 21) + SourceIndex(0)
|
||||
2 >Emitted(3, 8) Source(1, 24) + SourceIndex(0)
|
||||
---
|
||||
>>> 'c'
|
||||
1->^^^^
|
||||
2 > ^^^
|
||||
3 > ^^^^^^^^^^^^^^^^^^^^->
|
||||
1->,
|
||||
2 > 'c'
|
||||
1->Emitted(4, 5) Source(1, 26) + SourceIndex(0)
|
||||
2 >Emitted(4, 8) Source(1, 29) + SourceIndex(0)
|
||||
---
|
||||
>>>]; _i < _a.length; _i++) {
|
||||
1->^
|
||||
2 > ^^
|
||||
3 > ^^^^^^^^^^^^^^
|
||||
4 > ^^
|
||||
5 > ^^^^
|
||||
6 > ^
|
||||
1->]
|
||||
2 >
|
||||
3 > let v
|
||||
4 >
|
||||
5 > let v of ['a', 'b', 'c']
|
||||
6 > )
|
||||
1->Emitted(5, 2) Source(1, 30) + SourceIndex(0)
|
||||
2 >Emitted(5, 4) Source(1, 6) + SourceIndex(0)
|
||||
3 >Emitted(5, 18) Source(1, 11) + SourceIndex(0)
|
||||
4 >Emitted(5, 20) Source(1, 6) + SourceIndex(0)
|
||||
5 >Emitted(5, 24) Source(1, 30) + SourceIndex(0)
|
||||
6 >Emitted(5, 25) Source(1, 31) + SourceIndex(0)
|
||||
---
|
||||
>>> var v = _a[_i];
|
||||
1 >^^^^
|
||||
2 > ^^^^
|
||||
3 > ^
|
||||
4 > ^^^^^^^^^
|
||||
1 >
|
||||
2 > let
|
||||
3 > v
|
||||
4 >
|
||||
1 >Emitted(6, 5) Source(1, 6) + SourceIndex(0)
|
||||
2 >Emitted(6, 9) Source(1, 10) + SourceIndex(0)
|
||||
3 >Emitted(6, 10) Source(1, 11) + SourceIndex(0)
|
||||
4 >Emitted(6, 19) Source(1, 11) + SourceIndex(0)
|
||||
---
|
||||
>>> var x = v;
|
||||
1 >^^^^
|
||||
2 > ^^^^
|
||||
3 > ^
|
||||
4 > ^^^
|
||||
5 > ^
|
||||
6 > ^
|
||||
1 > of ['a', 'b', 'c']) {
|
||||
>
|
||||
2 > var
|
||||
3 > x
|
||||
4 > =
|
||||
5 > v
|
||||
6 > ;
|
||||
1 >Emitted(7, 5) Source(2, 5) + SourceIndex(0)
|
||||
2 >Emitted(7, 9) Source(2, 9) + SourceIndex(0)
|
||||
3 >Emitted(7, 10) Source(2, 10) + SourceIndex(0)
|
||||
4 >Emitted(7, 13) Source(2, 13) + SourceIndex(0)
|
||||
5 >Emitted(7, 14) Source(2, 14) + SourceIndex(0)
|
||||
6 >Emitted(7, 15) Source(2, 15) + SourceIndex(0)
|
||||
---
|
||||
>>>}
|
||||
1 >^
|
||||
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
>}
|
||||
1 >Emitted(8, 2) Source(3, 2) + SourceIndex(0)
|
||||
---
|
||||
>>>//# sourceMappingURL=ES5For-of13.js.map
|
||||
@@ -0,0 +1,9 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of14.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of14.ts (1 errors) ====
|
||||
for (const v of []) {
|
||||
~~~
|
||||
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
var x = v;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
//// [ES5For-of14.ts]
|
||||
for (const v of []) {
|
||||
var x = v;
|
||||
}
|
||||
|
||||
//// [ES5For-of14.js]
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var v = _a[_i];
|
||||
var x = v;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of15.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of15.ts (1 errors) ====
|
||||
for (let v of []) {
|
||||
~~~
|
||||
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
v;
|
||||
for (const v of []) {
|
||||
var x = v;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
//// [ES5For-of15.ts]
|
||||
for (let v of []) {
|
||||
v;
|
||||
for (const v of []) {
|
||||
var x = v;
|
||||
}
|
||||
}
|
||||
|
||||
//// [ES5For-of15.js]
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var v = _a[_i];
|
||||
v;
|
||||
for (var _b = 0, _c = []; _b < _c.length; _b++) {
|
||||
var _v = _c[_b];
|
||||
var x = _v;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of16.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of16.ts (1 errors) ====
|
||||
for (let v of []) {
|
||||
~~~
|
||||
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
v;
|
||||
for (let v of []) {
|
||||
var x = v;
|
||||
v++;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
//// [ES5For-of16.ts]
|
||||
for (let v of []) {
|
||||
v;
|
||||
for (let v of []) {
|
||||
var x = v;
|
||||
v++;
|
||||
}
|
||||
}
|
||||
|
||||
//// [ES5For-of16.js]
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var v = _a[_i];
|
||||
v;
|
||||
for (var _b = 0, _c = []; _b < _c.length; _b++) {
|
||||
var _v = _c[_b];
|
||||
var x = _v;
|
||||
_v++;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of17.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of17.ts (1 errors) ====
|
||||
for (let v of []) {
|
||||
~~~
|
||||
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
v;
|
||||
for (let v of [v]) {
|
||||
var x = v;
|
||||
v++;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
//// [ES5For-of17.ts]
|
||||
for (let v of []) {
|
||||
v;
|
||||
for (let v of [v]) {
|
||||
var x = v;
|
||||
v++;
|
||||
}
|
||||
}
|
||||
|
||||
//// [ES5For-of17.js]
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var v = _a[_i];
|
||||
v;
|
||||
for (var _b = 0, _c = [
|
||||
v
|
||||
]; _b < _c.length; _b++) {
|
||||
var _v = _c[_b];
|
||||
var x = _v;
|
||||
_v++;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of18.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of18.ts(4,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of18.ts (2 errors) ====
|
||||
for (let v of []) {
|
||||
~~~
|
||||
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
v;
|
||||
}
|
||||
for (let v of []) {
|
||||
~~~
|
||||
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
v;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
//// [ES5For-of18.ts]
|
||||
for (let v of []) {
|
||||
v;
|
||||
}
|
||||
for (let v of []) {
|
||||
v;
|
||||
}
|
||||
|
||||
|
||||
//// [ES5For-of18.js]
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var v = _a[_i];
|
||||
v;
|
||||
}
|
||||
for (var _b = 0, _c = []; _b < _c.length; _b++) {
|
||||
var _v = _c[_b];
|
||||
_v;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of19.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of19.ts (1 errors) ====
|
||||
for (let v of []) {
|
||||
~~~
|
||||
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
v;
|
||||
function foo() {
|
||||
for (const v of []) {
|
||||
v;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
//// [ES5For-of19.ts]
|
||||
for (let v of []) {
|
||||
v;
|
||||
function foo() {
|
||||
for (const v of []) {
|
||||
v;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//// [ES5For-of19.js]
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var v = _a[_i];
|
||||
v;
|
||||
function foo() {
|
||||
for (var _b = 0, _c = []; _b < _c.length; _b++) {
|
||||
var _v = _c[_b];
|
||||
_v;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of2.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of2.ts (1 errors) ====
|
||||
for (var v of []) {
|
||||
~~~
|
||||
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
var x = v;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
//// [ES5For-of2.ts]
|
||||
for (var v of []) {
|
||||
var x = v;
|
||||
}
|
||||
|
||||
//// [ES5For-of2.js]
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var v = _a[_i];
|
||||
var x = v;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of20.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of20.ts (1 errors) ====
|
||||
for (let v of []) {
|
||||
~~~
|
||||
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
let v;
|
||||
for (let v of [v]) {
|
||||
const v;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
//// [ES5For-of20.ts]
|
||||
for (let v of []) {
|
||||
let v;
|
||||
for (let v of [v]) {
|
||||
const v;
|
||||
}
|
||||
}
|
||||
|
||||
//// [ES5For-of20.js]
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var v = _a[_i];
|
||||
var _v;
|
||||
for (var _b = 0, _c = [
|
||||
v
|
||||
]; _b < _c.length; _b++) {
|
||||
var _v_1 = _c[_b];
|
||||
var _v_2;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of21.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of21.ts (1 errors) ====
|
||||
for (let v of []) {
|
||||
~~~
|
||||
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
for (let _i of []) { }
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
//// [ES5For-of21.ts]
|
||||
for (let v of []) {
|
||||
for (let _i of []) { }
|
||||
}
|
||||
|
||||
//// [ES5For-of21.js]
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var v = _a[_i];
|
||||
for (var _b = 0, _c = []; _b < _c.length; _b++) {
|
||||
var _i_1 = _c[_b];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of22.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of22.ts (1 errors) ====
|
||||
for (var x of [1, 2, 3]) {
|
||||
~~~
|
||||
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
let _a = 0;
|
||||
console.log(x);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
//// [ES5For-of22.ts]
|
||||
for (var x of [1, 2, 3]) {
|
||||
let _a = 0;
|
||||
console.log(x);
|
||||
}
|
||||
|
||||
//// [ES5For-of22.js]
|
||||
for (var _i = 0, _a = [
|
||||
1,
|
||||
2,
|
||||
3
|
||||
]; _i < _a.length; _i++) {
|
||||
var x = _a[_i];
|
||||
var _a_1 = 0;
|
||||
console.log(x);
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of23.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of23.ts (1 errors) ====
|
||||
for (var x of [1, 2, 3]) {
|
||||
~~~
|
||||
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
var _a = 0;
|
||||
console.log(x);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
//// [ES5For-of23.ts]
|
||||
for (var x of [1, 2, 3]) {
|
||||
var _a = 0;
|
||||
console.log(x);
|
||||
}
|
||||
|
||||
//// [ES5For-of23.js]
|
||||
for (var _i = 0, _b = [
|
||||
1,
|
||||
2,
|
||||
3
|
||||
]; _i < _b.length; _i++) {
|
||||
var x = _b[_i];
|
||||
var _a = 0;
|
||||
console.log(x);
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of24.ts(2,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of24.ts (1 errors) ====
|
||||
var a = [1, 2, 3];
|
||||
for (var v of a) {
|
||||
~~~
|
||||
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
let a = 0;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
//// [ES5For-of24.ts]
|
||||
var a = [1, 2, 3];
|
||||
for (var v of a) {
|
||||
let a = 0;
|
||||
}
|
||||
|
||||
//// [ES5For-of24.js]
|
||||
var a = [
|
||||
1,
|
||||
2,
|
||||
3
|
||||
];
|
||||
for (var _i = 0; _i < a.length; _i++) {
|
||||
var v = a[_i];
|
||||
var _a = 0;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of25.ts(2,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of25.ts (1 errors) ====
|
||||
var a = [1, 2, 3];
|
||||
for (var v of a) {
|
||||
~~~
|
||||
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
v;
|
||||
a;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
//// [ES5For-of25.ts]
|
||||
var a = [1, 2, 3];
|
||||
for (var v of a) {
|
||||
v;
|
||||
a;
|
||||
}
|
||||
|
||||
//// [ES5For-of25.js]
|
||||
var a = [
|
||||
1,
|
||||
2,
|
||||
3
|
||||
];
|
||||
for (var _i = 0; _i < a.length; _i++) {
|
||||
var v = a[_i];
|
||||
v;
|
||||
a;
|
||||
}
|
||||
//# sourceMappingURL=ES5For-of25.js.map
|
||||
@@ -0,0 +1,2 @@
|
||||
//// [ES5For-of25.js.map]
|
||||
{"version":3,"file":"ES5For-of25.js","sourceRoot":"","sources":["ES5For-of25.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG;IAAC,CAAC;IAAE,CAAC;IAAE,CAAC;CAAC,CAAC;AAClB,GAAG,CAAC,CAAU,UAAC,EAAV,aAAK,EAAL,IAAU,CAAC;IAAX,IAAI,CAAC,GAAI,CAAC,IAAL;IACN,CAAC,CAAC;IACF,CAAC,CAAC;CACL"}
|
||||
@@ -0,0 +1,145 @@
|
||||
===================================================================
|
||||
JsFile: ES5For-of25.js
|
||||
mapUrl: ES5For-of25.js.map
|
||||
sourceRoot:
|
||||
sources: ES5For-of25.ts
|
||||
===================================================================
|
||||
-------------------------------------------------------------------
|
||||
emittedFile:tests/cases/conformance/statements/for-ofStatements/ES5For-of25.js
|
||||
sourceFile:ES5For-of25.ts
|
||||
-------------------------------------------------------------------
|
||||
>>>var a = [
|
||||
1 >
|
||||
2 >^^^^
|
||||
3 > ^
|
||||
4 > ^^^
|
||||
1 >
|
||||
2 >var
|
||||
3 > a
|
||||
4 > =
|
||||
1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
|
||||
2 >Emitted(1, 5) Source(1, 5) + SourceIndex(0)
|
||||
3 >Emitted(1, 6) Source(1, 6) + SourceIndex(0)
|
||||
4 >Emitted(1, 9) Source(1, 9) + SourceIndex(0)
|
||||
---
|
||||
>>> 1,
|
||||
1 >^^^^
|
||||
2 > ^
|
||||
3 > ^^->
|
||||
1 >[
|
||||
2 > 1
|
||||
1 >Emitted(2, 5) Source(1, 10) + SourceIndex(0)
|
||||
2 >Emitted(2, 6) Source(1, 11) + SourceIndex(0)
|
||||
---
|
||||
>>> 2,
|
||||
1->^^^^
|
||||
2 > ^
|
||||
3 > ^->
|
||||
1->,
|
||||
2 > 2
|
||||
1->Emitted(3, 5) Source(1, 13) + SourceIndex(0)
|
||||
2 >Emitted(3, 6) Source(1, 14) + SourceIndex(0)
|
||||
---
|
||||
>>> 3
|
||||
1->^^^^
|
||||
2 > ^
|
||||
1->,
|
||||
2 > 3
|
||||
1->Emitted(4, 5) Source(1, 16) + SourceIndex(0)
|
||||
2 >Emitted(4, 6) Source(1, 17) + SourceIndex(0)
|
||||
---
|
||||
>>>];
|
||||
1 >^
|
||||
2 > ^
|
||||
3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >]
|
||||
2 > ;
|
||||
1 >Emitted(5, 2) Source(1, 18) + SourceIndex(0)
|
||||
2 >Emitted(5, 3) Source(1, 19) + SourceIndex(0)
|
||||
---
|
||||
>>>for (var _i = 0; _i < a.length; _i++) {
|
||||
1->
|
||||
2 >^^^
|
||||
3 > ^
|
||||
4 > ^
|
||||
5 > ^^^^^^^^^^
|
||||
6 > ^^
|
||||
7 > ^^^^^^^^^^^^^
|
||||
8 > ^^
|
||||
9 > ^^^^
|
||||
10> ^
|
||||
1->
|
||||
>
|
||||
2 >for
|
||||
3 >
|
||||
4 > (var v of
|
||||
5 > a
|
||||
6 >
|
||||
7 > var v
|
||||
8 >
|
||||
9 > var v of a
|
||||
10> )
|
||||
1->Emitted(6, 1) Source(2, 1) + SourceIndex(0)
|
||||
2 >Emitted(6, 4) Source(2, 4) + SourceIndex(0)
|
||||
3 >Emitted(6, 5) Source(2, 5) + SourceIndex(0)
|
||||
4 >Emitted(6, 6) Source(2, 15) + SourceIndex(0)
|
||||
5 >Emitted(6, 16) Source(2, 16) + SourceIndex(0)
|
||||
6 >Emitted(6, 18) Source(2, 6) + SourceIndex(0)
|
||||
7 >Emitted(6, 31) Source(2, 11) + SourceIndex(0)
|
||||
8 >Emitted(6, 33) Source(2, 6) + SourceIndex(0)
|
||||
9 >Emitted(6, 37) Source(2, 16) + SourceIndex(0)
|
||||
10>Emitted(6, 38) Source(2, 17) + SourceIndex(0)
|
||||
---
|
||||
>>> var v = a[_i];
|
||||
1 >^^^^
|
||||
2 > ^^^^
|
||||
3 > ^
|
||||
4 > ^^^
|
||||
5 > ^
|
||||
6 > ^^^^
|
||||
1 >
|
||||
2 > var
|
||||
3 > v
|
||||
4 > of
|
||||
5 > a
|
||||
6 >
|
||||
1 >Emitted(7, 5) Source(2, 6) + SourceIndex(0)
|
||||
2 >Emitted(7, 9) Source(2, 10) + SourceIndex(0)
|
||||
3 >Emitted(7, 10) Source(2, 11) + SourceIndex(0)
|
||||
4 >Emitted(7, 13) Source(2, 15) + SourceIndex(0)
|
||||
5 >Emitted(7, 14) Source(2, 16) + SourceIndex(0)
|
||||
6 >Emitted(7, 18) Source(2, 11) + SourceIndex(0)
|
||||
---
|
||||
>>> v;
|
||||
1 >^^^^
|
||||
2 > ^
|
||||
3 > ^
|
||||
4 > ^->
|
||||
1 > of a) {
|
||||
>
|
||||
2 > v
|
||||
3 > ;
|
||||
1 >Emitted(8, 5) Source(3, 5) + SourceIndex(0)
|
||||
2 >Emitted(8, 6) Source(3, 6) + SourceIndex(0)
|
||||
3 >Emitted(8, 7) Source(3, 7) + SourceIndex(0)
|
||||
---
|
||||
>>> a;
|
||||
1->^^^^
|
||||
2 > ^
|
||||
3 > ^
|
||||
1->
|
||||
>
|
||||
2 > a
|
||||
3 > ;
|
||||
1->Emitted(9, 5) Source(4, 5) + SourceIndex(0)
|
||||
2 >Emitted(9, 6) Source(4, 6) + SourceIndex(0)
|
||||
3 >Emitted(9, 7) Source(4, 7) + SourceIndex(0)
|
||||
---
|
||||
>>>}
|
||||
1 >^
|
||||
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
>}
|
||||
1 >Emitted(10, 2) Source(5, 2) + SourceIndex(0)
|
||||
---
|
||||
>>>//# sourceMappingURL=ES5For-of25.js.map
|
||||
@@ -0,0 +1,10 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of26.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of26.ts (1 errors) ====
|
||||
for (var [a = 0, b = 1] of [2, 3]) {
|
||||
~~~
|
||||
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
a;
|
||||
b;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
//// [ES5For-of26.ts]
|
||||
for (var [a = 0, b = 1] of [2, 3]) {
|
||||
a;
|
||||
b;
|
||||
}
|
||||
|
||||
//// [ES5For-of26.js]
|
||||
for (var _i = 0, _a = [
|
||||
2,
|
||||
3
|
||||
]; _i < _a.length; _i++) {
|
||||
var _b = _a[_i], _c = _b[0], a = _c === void 0 ? 0 : _c, _d = _b[1], b = _d === void 0 ? 1 : _d;
|
||||
a;
|
||||
b;
|
||||
}
|
||||
//# sourceMappingURL=ES5For-of26.js.map
|
||||
@@ -0,0 +1,2 @@
|
||||
//// [ES5For-of26.js.map]
|
||||
{"version":3,"file":"ES5For-of26.js","sourceRoot":"","sources":["ES5For-of26.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAuB,UAAM,EAAN;IAAC,CAAC;IAAE,CAAC;CAAC,EAA5B,cAAkB,EAAlB,IAA4B,CAAC;IAA7B,6BAAK,CAAC,mBAAG,CAAC,mBAAE,CAAC,mBAAG,CAAC,KAAC;IACnB,CAAC,CAAC;IACF,CAAC,CAAC;CACL"}
|
||||
@@ -0,0 +1,134 @@
|
||||
===================================================================
|
||||
JsFile: ES5For-of26.js
|
||||
mapUrl: ES5For-of26.js.map
|
||||
sourceRoot:
|
||||
sources: ES5For-of26.ts
|
||||
===================================================================
|
||||
-------------------------------------------------------------------
|
||||
emittedFile:tests/cases/conformance/statements/for-ofStatements/ES5For-of26.js
|
||||
sourceFile:ES5For-of26.ts
|
||||
-------------------------------------------------------------------
|
||||
>>>for (var _i = 0, _a = [
|
||||
1 >
|
||||
2 >^^^
|
||||
3 > ^
|
||||
4 > ^
|
||||
5 > ^^^^^^^^^^
|
||||
6 > ^^
|
||||
1 >
|
||||
2 >for
|
||||
3 >
|
||||
4 > (var [a = 0, b = 1] of
|
||||
5 > [2, 3]
|
||||
6 >
|
||||
1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
|
||||
2 >Emitted(1, 4) Source(1, 4) + SourceIndex(0)
|
||||
3 >Emitted(1, 5) Source(1, 5) + SourceIndex(0)
|
||||
4 >Emitted(1, 6) Source(1, 28) + SourceIndex(0)
|
||||
5 >Emitted(1, 16) Source(1, 34) + SourceIndex(0)
|
||||
6 >Emitted(1, 18) Source(1, 28) + SourceIndex(0)
|
||||
---
|
||||
>>> 2,
|
||||
1 >^^^^
|
||||
2 > ^
|
||||
3 > ^->
|
||||
1 >[
|
||||
2 > 2
|
||||
1 >Emitted(2, 5) Source(1, 29) + SourceIndex(0)
|
||||
2 >Emitted(2, 6) Source(1, 30) + SourceIndex(0)
|
||||
---
|
||||
>>> 3
|
||||
1->^^^^
|
||||
2 > ^
|
||||
3 > ^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1->,
|
||||
2 > 3
|
||||
1->Emitted(3, 5) Source(1, 32) + SourceIndex(0)
|
||||
2 >Emitted(3, 6) Source(1, 33) + SourceIndex(0)
|
||||
---
|
||||
>>>]; _i < _a.length; _i++) {
|
||||
1->^
|
||||
2 > ^^
|
||||
3 > ^^^^^^^^^^^^^^
|
||||
4 > ^^
|
||||
5 > ^^^^
|
||||
6 > ^
|
||||
7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1->]
|
||||
2 >
|
||||
3 > var [a = 0, b = 1]
|
||||
4 >
|
||||
5 > var [a = 0, b = 1] of [2, 3]
|
||||
6 > )
|
||||
1->Emitted(4, 2) Source(1, 34) + SourceIndex(0)
|
||||
2 >Emitted(4, 4) Source(1, 6) + SourceIndex(0)
|
||||
3 >Emitted(4, 18) Source(1, 24) + SourceIndex(0)
|
||||
4 >Emitted(4, 20) Source(1, 6) + SourceIndex(0)
|
||||
5 >Emitted(4, 24) Source(1, 34) + SourceIndex(0)
|
||||
6 >Emitted(4, 25) Source(1, 35) + SourceIndex(0)
|
||||
---
|
||||
>>> var _b = _a[_i], _c = _b[0], a = _c === void 0 ? 0 : _c, _d = _b[1], b = _d === void 0 ? 1 : _d;
|
||||
1->^^^^
|
||||
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
3 > ^
|
||||
4 > ^^^^^^^^^^^^^^^^^^^
|
||||
5 > ^
|
||||
6 > ^^^^^^^^^^^^^^^^^^^
|
||||
7 > ^
|
||||
8 > ^^^^^^^^^^^^^^^^^^^
|
||||
9 > ^
|
||||
10> ^^^^^
|
||||
1->
|
||||
2 > var [
|
||||
3 > a
|
||||
4 > =
|
||||
5 > 0
|
||||
6 > ,
|
||||
7 > b
|
||||
8 > =
|
||||
9 > 1
|
||||
10> ]
|
||||
1->Emitted(5, 5) Source(1, 6) + SourceIndex(0)
|
||||
2 >Emitted(5, 34) Source(1, 11) + SourceIndex(0)
|
||||
3 >Emitted(5, 35) Source(1, 12) + SourceIndex(0)
|
||||
4 >Emitted(5, 54) Source(1, 15) + SourceIndex(0)
|
||||
5 >Emitted(5, 55) Source(1, 16) + SourceIndex(0)
|
||||
6 >Emitted(5, 74) Source(1, 18) + SourceIndex(0)
|
||||
7 >Emitted(5, 75) Source(1, 19) + SourceIndex(0)
|
||||
8 >Emitted(5, 94) Source(1, 22) + SourceIndex(0)
|
||||
9 >Emitted(5, 95) Source(1, 23) + SourceIndex(0)
|
||||
10>Emitted(5, 100) Source(1, 24) + SourceIndex(0)
|
||||
---
|
||||
>>> a;
|
||||
1 >^^^^
|
||||
2 > ^
|
||||
3 > ^
|
||||
4 > ^->
|
||||
1 > of [2, 3]) {
|
||||
>
|
||||
2 > a
|
||||
3 > ;
|
||||
1 >Emitted(6, 5) Source(2, 5) + SourceIndex(0)
|
||||
2 >Emitted(6, 6) Source(2, 6) + SourceIndex(0)
|
||||
3 >Emitted(6, 7) Source(2, 7) + SourceIndex(0)
|
||||
---
|
||||
>>> b;
|
||||
1->^^^^
|
||||
2 > ^
|
||||
3 > ^
|
||||
1->
|
||||
>
|
||||
2 > b
|
||||
3 > ;
|
||||
1->Emitted(7, 5) Source(3, 5) + SourceIndex(0)
|
||||
2 >Emitted(7, 6) Source(3, 6) + SourceIndex(0)
|
||||
3 >Emitted(7, 7) Source(3, 7) + SourceIndex(0)
|
||||
---
|
||||
>>>}
|
||||
1 >^
|
||||
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
>}
|
||||
1 >Emitted(8, 2) Source(4, 2) + SourceIndex(0)
|
||||
---
|
||||
>>>//# sourceMappingURL=ES5For-of26.js.map
|
||||
@@ -0,0 +1,10 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of27.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of27.ts (1 errors) ====
|
||||
for (var {x: a = 0, y: b = 1} of [2, 3]) {
|
||||
~~~
|
||||
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
a;
|
||||
b;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
//// [ES5For-of27.ts]
|
||||
for (var {x: a = 0, y: b = 1} of [2, 3]) {
|
||||
a;
|
||||
b;
|
||||
}
|
||||
|
||||
//// [ES5For-of27.js]
|
||||
for (var _i = 0, _a = [
|
||||
2,
|
||||
3
|
||||
]; _i < _a.length; _i++) {
|
||||
var _b = _a[_i], _c = _b.x, a = _c === void 0 ? 0 : _c, _d = _b.y, b = _d === void 0 ? 1 : _d;
|
||||
a;
|
||||
b;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of28.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of28.ts (1 errors) ====
|
||||
for (let [a = 0, b = 1] of [2, 3]) {
|
||||
~~~
|
||||
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
a;
|
||||
b;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
//// [ES5For-of28.ts]
|
||||
for (let [a = 0, b = 1] of [2, 3]) {
|
||||
a;
|
||||
b;
|
||||
}
|
||||
|
||||
//// [ES5For-of28.js]
|
||||
for (var _i = 0, _a = [
|
||||
2,
|
||||
3
|
||||
]; _i < _a.length; _i++) {
|
||||
var _b = _a[_i], _c = _b[0], a = _c === void 0 ? 0 : _c, _d = _b[1], b = _d === void 0 ? 1 : _d;
|
||||
a;
|
||||
b;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of29.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of29.ts (1 errors) ====
|
||||
for (const {x: a = 0, y: b = 1} of [2, 3]) {
|
||||
~~~
|
||||
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
a;
|
||||
b;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
//// [ES5For-of29.ts]
|
||||
for (const {x: a = 0, y: b = 1} of [2, 3]) {
|
||||
a;
|
||||
b;
|
||||
}
|
||||
|
||||
//// [ES5For-of29.js]
|
||||
for (var _i = 0, _a = [
|
||||
2,
|
||||
3
|
||||
]; _i < _a.length; _i++) {
|
||||
var _b = _a[_i], _c = _b.x, a = _c === void 0 ? 0 : _c, _d = _b.y, b = _d === void 0 ? 1 : _d;
|
||||
a;
|
||||
b;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of3.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of3.ts (1 errors) ====
|
||||
for (var v of ['a', 'b', 'c'])
|
||||
~~~
|
||||
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
var x = v;
|
||||
@@ -0,0 +1,14 @@
|
||||
//// [ES5For-of3.ts]
|
||||
for (var v of ['a', 'b', 'c'])
|
||||
var x = v;
|
||||
|
||||
//// [ES5For-of3.js]
|
||||
for (var _i = 0, _a = [
|
||||
'a',
|
||||
'b',
|
||||
'c'
|
||||
]; _i < _a.length; _i++) {
|
||||
var v = _a[_i];
|
||||
var x = v;
|
||||
}
|
||||
//# sourceMappingURL=ES5For-of3.js.map
|
||||
@@ -0,0 +1,2 @@
|
||||
//// [ES5For-of3.js.map]
|
||||
{"version":3,"file":"ES5For-of3.js","sourceRoot":"","sources":["ES5For-of3.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAU,UAAe,EAAf;IAAC,GAAG;IAAE,GAAG;IAAE,GAAG;CAAC,EAAxB,cAAK,EAAL,IAAwB,CAAC;IAAzB,IAAI,CAAC,SAAA;IACN,IAAI,CAAC,GAAG,CAAC,CAAC;CAAA"}
|
||||
@@ -0,0 +1,119 @@
|
||||
===================================================================
|
||||
JsFile: ES5For-of3.js
|
||||
mapUrl: ES5For-of3.js.map
|
||||
sourceRoot:
|
||||
sources: ES5For-of3.ts
|
||||
===================================================================
|
||||
-------------------------------------------------------------------
|
||||
emittedFile:tests/cases/conformance/statements/for-ofStatements/ES5For-of3.js
|
||||
sourceFile:ES5For-of3.ts
|
||||
-------------------------------------------------------------------
|
||||
>>>for (var _i = 0, _a = [
|
||||
1 >
|
||||
2 >^^^
|
||||
3 > ^
|
||||
4 > ^
|
||||
5 > ^^^^^^^^^^
|
||||
6 > ^^
|
||||
1 >
|
||||
2 >for
|
||||
3 >
|
||||
4 > (var v of
|
||||
5 > ['a', 'b', 'c']
|
||||
6 >
|
||||
1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
|
||||
2 >Emitted(1, 4) Source(1, 4) + SourceIndex(0)
|
||||
3 >Emitted(1, 5) Source(1, 5) + SourceIndex(0)
|
||||
4 >Emitted(1, 6) Source(1, 15) + SourceIndex(0)
|
||||
5 >Emitted(1, 16) Source(1, 30) + SourceIndex(0)
|
||||
6 >Emitted(1, 18) Source(1, 15) + SourceIndex(0)
|
||||
---
|
||||
>>> 'a',
|
||||
1 >^^^^
|
||||
2 > ^^^
|
||||
3 > ^^->
|
||||
1 >[
|
||||
2 > 'a'
|
||||
1 >Emitted(2, 5) Source(1, 16) + SourceIndex(0)
|
||||
2 >Emitted(2, 8) Source(1, 19) + SourceIndex(0)
|
||||
---
|
||||
>>> 'b',
|
||||
1->^^^^
|
||||
2 > ^^^
|
||||
3 > ^->
|
||||
1->,
|
||||
2 > 'b'
|
||||
1->Emitted(3, 5) Source(1, 21) + SourceIndex(0)
|
||||
2 >Emitted(3, 8) Source(1, 24) + SourceIndex(0)
|
||||
---
|
||||
>>> 'c'
|
||||
1->^^^^
|
||||
2 > ^^^
|
||||
3 > ^^^^^^^^^^^^^^^^^^^^->
|
||||
1->,
|
||||
2 > 'c'
|
||||
1->Emitted(4, 5) Source(1, 26) + SourceIndex(0)
|
||||
2 >Emitted(4, 8) Source(1, 29) + SourceIndex(0)
|
||||
---
|
||||
>>>]; _i < _a.length; _i++) {
|
||||
1->^
|
||||
2 > ^^
|
||||
3 > ^^^^^^^^^^^^^^
|
||||
4 > ^^
|
||||
5 > ^^^^
|
||||
6 > ^
|
||||
1->]
|
||||
2 >
|
||||
3 > var v
|
||||
4 >
|
||||
5 > var v of ['a', 'b', 'c']
|
||||
6 > )
|
||||
1->Emitted(5, 2) Source(1, 30) + SourceIndex(0)
|
||||
2 >Emitted(5, 4) Source(1, 6) + SourceIndex(0)
|
||||
3 >Emitted(5, 18) Source(1, 11) + SourceIndex(0)
|
||||
4 >Emitted(5, 20) Source(1, 6) + SourceIndex(0)
|
||||
5 >Emitted(5, 24) Source(1, 30) + SourceIndex(0)
|
||||
6 >Emitted(5, 25) Source(1, 31) + SourceIndex(0)
|
||||
---
|
||||
>>> var v = _a[_i];
|
||||
1 >^^^^
|
||||
2 > ^^^^
|
||||
3 > ^
|
||||
4 > ^^^^^^^^^
|
||||
1 >
|
||||
2 > var
|
||||
3 > v
|
||||
4 >
|
||||
1 >Emitted(6, 5) Source(1, 6) + SourceIndex(0)
|
||||
2 >Emitted(6, 9) Source(1, 10) + SourceIndex(0)
|
||||
3 >Emitted(6, 10) Source(1, 11) + SourceIndex(0)
|
||||
4 >Emitted(6, 19) Source(1, 11) + SourceIndex(0)
|
||||
---
|
||||
>>> var x = v;
|
||||
1 >^^^^
|
||||
2 > ^^^^
|
||||
3 > ^
|
||||
4 > ^^^
|
||||
5 > ^
|
||||
6 > ^
|
||||
1 > of ['a', 'b', 'c'])
|
||||
>
|
||||
2 > var
|
||||
3 > x
|
||||
4 > =
|
||||
5 > v
|
||||
6 > ;
|
||||
1 >Emitted(7, 5) Source(2, 5) + SourceIndex(0)
|
||||
2 >Emitted(7, 9) Source(2, 9) + SourceIndex(0)
|
||||
3 >Emitted(7, 10) Source(2, 10) + SourceIndex(0)
|
||||
4 >Emitted(7, 13) Source(2, 13) + SourceIndex(0)
|
||||
5 >Emitted(7, 14) Source(2, 14) + SourceIndex(0)
|
||||
6 >Emitted(7, 15) Source(2, 15) + SourceIndex(0)
|
||||
---
|
||||
>>>}
|
||||
1 >^
|
||||
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
1 >Emitted(8, 2) Source(2, 15) + SourceIndex(0)
|
||||
---
|
||||
>>>//# sourceMappingURL=ES5For-of3.js.map
|
||||
@@ -0,0 +1,12 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of30.ts(3,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of30.ts (1 errors) ====
|
||||
var a: string, b: number;
|
||||
var tuple: [number, string] = [2, "3"];
|
||||
for ([a = 1, b = ""] of tuple) {
|
||||
~~~
|
||||
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
a;
|
||||
b;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
//// [ES5For-of30.ts]
|
||||
var a: string, b: number;
|
||||
var tuple: [number, string] = [2, "3"];
|
||||
for ([a = 1, b = ""] of tuple) {
|
||||
a;
|
||||
b;
|
||||
}
|
||||
|
||||
//// [ES5For-of30.js]
|
||||
var a, b;
|
||||
var tuple = [
|
||||
2,
|
||||
"3"
|
||||
];
|
||||
for (var _i = 0; _i < tuple.length; _i++) {
|
||||
_a = tuple[_i], _b = _a[0], a = _b === void 0 ? 1 : _b, _c = _a[1], b = _c === void 0 ? "" : _c;
|
||||
a;
|
||||
b;
|
||||
}
|
||||
var _a, _b, _c;
|
||||
@@ -0,0 +1,12 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of31.ts(3,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of31.ts (1 errors) ====
|
||||
var a: string, b: number;
|
||||
|
||||
for ({ a: b = 1, b: a = ""} of []) {
|
||||
~~~
|
||||
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
a;
|
||||
b;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
//// [ES5For-of31.ts]
|
||||
var a: string, b: number;
|
||||
|
||||
for ({ a: b = 1, b: a = ""} of []) {
|
||||
a;
|
||||
b;
|
||||
}
|
||||
|
||||
//// [ES5For-of31.js]
|
||||
var a, b;
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
_b = _a[_i], _c = _b.a, b = _c === void 0 ? 1 : _c, _d = _b.b, a = _d === void 0 ? "" : _d;
|
||||
a;
|
||||
b;
|
||||
}
|
||||
var _b, _c, _d;
|
||||
@@ -0,0 +1,9 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of4.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of4.ts (1 errors) ====
|
||||
for (var v of [])
|
||||
~~~
|
||||
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
var x = v;
|
||||
var y = v;
|
||||
@@ -0,0 +1,11 @@
|
||||
//// [ES5For-of4.ts]
|
||||
for (var v of [])
|
||||
var x = v;
|
||||
var y = v;
|
||||
|
||||
//// [ES5For-of4.js]
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var v = _a[_i];
|
||||
var x = v;
|
||||
}
|
||||
var y = v;
|
||||
@@ -0,0 +1,9 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of5.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of5.ts (1 errors) ====
|
||||
for (var _a of []) {
|
||||
~~~
|
||||
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
var x = _a;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
//// [ES5For-of5.ts]
|
||||
for (var _a of []) {
|
||||
var x = _a;
|
||||
}
|
||||
|
||||
//// [ES5For-of5.js]
|
||||
for (var _i = 0, _b = []; _i < _b.length; _i++) {
|
||||
var _a = _b[_i];
|
||||
var x = _a;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of6.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of6.ts (1 errors) ====
|
||||
for (var w of []) {
|
||||
~~~
|
||||
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
for (var v of []) {
|
||||
var x = [w, v];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
//// [ES5For-of6.ts]
|
||||
for (var w of []) {
|
||||
for (var v of []) {
|
||||
var x = [w, v];
|
||||
}
|
||||
}
|
||||
|
||||
//// [ES5For-of6.js]
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var w = _a[_i];
|
||||
for (var _b = 0, _c = []; _b < _c.length; _b++) {
|
||||
var v = _c[_b];
|
||||
var x = [
|
||||
w,
|
||||
v
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of7.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of7.ts(5,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of7.ts (2 errors) ====
|
||||
for (var w of []) {
|
||||
~~~
|
||||
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
var x = w;
|
||||
}
|
||||
|
||||
for (var v of []) {
|
||||
~~~
|
||||
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
var x = [w, v];
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
//// [ES5For-of7.ts]
|
||||
for (var w of []) {
|
||||
var x = w;
|
||||
}
|
||||
|
||||
for (var v of []) {
|
||||
var x = [w, v];
|
||||
}
|
||||
|
||||
//// [ES5For-of7.js]
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var w = _a[_i];
|
||||
var x = w;
|
||||
}
|
||||
for (var _b = 0, _c = []; _b < _c.length; _b++) {
|
||||
var v = _c[_b];
|
||||
var x = [
|
||||
w,
|
||||
v
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of8.ts(4,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of8.ts (1 errors) ====
|
||||
function foo() {
|
||||
return { x: 0 };
|
||||
}
|
||||
for (foo().x of ['a', 'b', 'c']) {
|
||||
~~~
|
||||
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
var p = foo().x;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
//// [ES5For-of8.ts]
|
||||
function foo() {
|
||||
return { x: 0 };
|
||||
}
|
||||
for (foo().x of ['a', 'b', 'c']) {
|
||||
var p = foo().x;
|
||||
}
|
||||
|
||||
//// [ES5For-of8.js]
|
||||
function foo() {
|
||||
return {
|
||||
x: 0
|
||||
};
|
||||
}
|
||||
for (var _i = 0, _a = [
|
||||
'a',
|
||||
'b',
|
||||
'c'
|
||||
]; _i < _a.length; _i++) {
|
||||
foo().x = _a[_i];
|
||||
var p = foo().x;
|
||||
}
|
||||
//# sourceMappingURL=ES5For-of8.js.map
|
||||
@@ -0,0 +1,2 @@
|
||||
//// [ES5For-of8.js.map]
|
||||
{"version":3,"file":"ES5For-of8.js","sourceRoot":"","sources":["ES5For-of8.ts"],"names":["foo"],"mappings":"AAAA;IACIA,MAAMA,CAACA;QAAEA,CAACA,EAAEA,CAACA;KAAEA,CAACA;AACpBA,CAACA;AACD,GAAG,CAAC,CAAY,UAAe,EAAf;IAAC,GAAG;IAAE,GAAG;IAAE,GAAG;CAAC,EAA1B,cAAO,EAAP,IAA0B,CAAC;IAA3B,GAAG,EAAE,CAAC,CAAC,SAAA;IACR,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;CACnB"}
|
||||
@@ -0,0 +1,188 @@
|
||||
===================================================================
|
||||
JsFile: ES5For-of8.js
|
||||
mapUrl: ES5For-of8.js.map
|
||||
sourceRoot:
|
||||
sources: ES5For-of8.ts
|
||||
===================================================================
|
||||
-------------------------------------------------------------------
|
||||
emittedFile:tests/cases/conformance/statements/for-ofStatements/ES5For-of8.js
|
||||
sourceFile:ES5For-of8.ts
|
||||
-------------------------------------------------------------------
|
||||
>>>function foo() {
|
||||
1 >
|
||||
2 >^^^^^^^^^^^^^->
|
||||
1 >
|
||||
1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
|
||||
---
|
||||
>>> return {
|
||||
1->^^^^
|
||||
2 > ^^^^^^
|
||||
3 > ^
|
||||
4 > ^^->
|
||||
1->function foo() {
|
||||
>
|
||||
2 > return
|
||||
3 >
|
||||
1->Emitted(2, 5) Source(2, 5) + SourceIndex(0) name (foo)
|
||||
2 >Emitted(2, 11) Source(2, 11) + SourceIndex(0) name (foo)
|
||||
3 >Emitted(2, 12) Source(2, 12) + SourceIndex(0) name (foo)
|
||||
---
|
||||
>>> x: 0
|
||||
1->^^^^^^^^
|
||||
2 > ^
|
||||
3 > ^^
|
||||
4 > ^
|
||||
1->{
|
||||
2 > x
|
||||
3 > :
|
||||
4 > 0
|
||||
1->Emitted(3, 9) Source(2, 14) + SourceIndex(0) name (foo)
|
||||
2 >Emitted(3, 10) Source(2, 15) + SourceIndex(0) name (foo)
|
||||
3 >Emitted(3, 12) Source(2, 17) + SourceIndex(0) name (foo)
|
||||
4 >Emitted(3, 13) Source(2, 18) + SourceIndex(0) name (foo)
|
||||
---
|
||||
>>> };
|
||||
1 >^^^^^
|
||||
2 > ^
|
||||
1 > }
|
||||
2 > ;
|
||||
1 >Emitted(4, 6) Source(2, 20) + SourceIndex(0) name (foo)
|
||||
2 >Emitted(4, 7) Source(2, 21) + SourceIndex(0) name (foo)
|
||||
---
|
||||
>>>}
|
||||
1 >
|
||||
2 >^
|
||||
3 > ^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
>
|
||||
2 >}
|
||||
1 >Emitted(5, 1) Source(3, 1) + SourceIndex(0) name (foo)
|
||||
2 >Emitted(5, 2) Source(3, 2) + SourceIndex(0) name (foo)
|
||||
---
|
||||
>>>for (var _i = 0, _a = [
|
||||
1->
|
||||
2 >^^^
|
||||
3 > ^
|
||||
4 > ^
|
||||
5 > ^^^^^^^^^^
|
||||
6 > ^^
|
||||
1->
|
||||
>
|
||||
2 >for
|
||||
3 >
|
||||
4 > (foo().x of
|
||||
5 > ['a', 'b', 'c']
|
||||
6 >
|
||||
1->Emitted(6, 1) Source(4, 1) + SourceIndex(0)
|
||||
2 >Emitted(6, 4) Source(4, 4) + SourceIndex(0)
|
||||
3 >Emitted(6, 5) Source(4, 5) + SourceIndex(0)
|
||||
4 >Emitted(6, 6) Source(4, 17) + SourceIndex(0)
|
||||
5 >Emitted(6, 16) Source(4, 32) + SourceIndex(0)
|
||||
6 >Emitted(6, 18) Source(4, 17) + SourceIndex(0)
|
||||
---
|
||||
>>> 'a',
|
||||
1 >^^^^
|
||||
2 > ^^^
|
||||
3 > ^^->
|
||||
1 >[
|
||||
2 > 'a'
|
||||
1 >Emitted(7, 5) Source(4, 18) + SourceIndex(0)
|
||||
2 >Emitted(7, 8) Source(4, 21) + SourceIndex(0)
|
||||
---
|
||||
>>> 'b',
|
||||
1->^^^^
|
||||
2 > ^^^
|
||||
3 > ^->
|
||||
1->,
|
||||
2 > 'b'
|
||||
1->Emitted(8, 5) Source(4, 23) + SourceIndex(0)
|
||||
2 >Emitted(8, 8) Source(4, 26) + SourceIndex(0)
|
||||
---
|
||||
>>> 'c'
|
||||
1->^^^^
|
||||
2 > ^^^
|
||||
3 > ^^^^^^^^^^^^^^^^^^^^->
|
||||
1->,
|
||||
2 > 'c'
|
||||
1->Emitted(9, 5) Source(4, 28) + SourceIndex(0)
|
||||
2 >Emitted(9, 8) Source(4, 31) + SourceIndex(0)
|
||||
---
|
||||
>>>]; _i < _a.length; _i++) {
|
||||
1->^
|
||||
2 > ^^
|
||||
3 > ^^^^^^^^^^^^^^
|
||||
4 > ^^
|
||||
5 > ^^^^
|
||||
6 > ^
|
||||
1->]
|
||||
2 >
|
||||
3 > foo().x
|
||||
4 >
|
||||
5 > foo().x of ['a', 'b', 'c']
|
||||
6 > )
|
||||
1->Emitted(10, 2) Source(4, 32) + SourceIndex(0)
|
||||
2 >Emitted(10, 4) Source(4, 6) + SourceIndex(0)
|
||||
3 >Emitted(10, 18) Source(4, 13) + SourceIndex(0)
|
||||
4 >Emitted(10, 20) Source(4, 6) + SourceIndex(0)
|
||||
5 >Emitted(10, 24) Source(4, 32) + SourceIndex(0)
|
||||
6 >Emitted(10, 25) Source(4, 33) + SourceIndex(0)
|
||||
---
|
||||
>>> foo().x = _a[_i];
|
||||
1 >^^^^
|
||||
2 > ^^^
|
||||
3 > ^^
|
||||
4 > ^
|
||||
5 > ^
|
||||
6 > ^^^^^^^^^
|
||||
7 > ^->
|
||||
1 >
|
||||
2 > foo
|
||||
3 > ()
|
||||
4 > .
|
||||
5 > x
|
||||
6 >
|
||||
1 >Emitted(11, 5) Source(4, 6) + SourceIndex(0)
|
||||
2 >Emitted(11, 8) Source(4, 9) + SourceIndex(0)
|
||||
3 >Emitted(11, 10) Source(4, 11) + SourceIndex(0)
|
||||
4 >Emitted(11, 11) Source(4, 12) + SourceIndex(0)
|
||||
5 >Emitted(11, 12) Source(4, 13) + SourceIndex(0)
|
||||
6 >Emitted(11, 21) Source(4, 13) + SourceIndex(0)
|
||||
---
|
||||
>>> var p = foo().x;
|
||||
1->^^^^
|
||||
2 > ^^^^
|
||||
3 > ^
|
||||
4 > ^^^
|
||||
5 > ^^^
|
||||
6 > ^^
|
||||
7 > ^
|
||||
8 > ^
|
||||
9 > ^
|
||||
1-> of ['a', 'b', 'c']) {
|
||||
>
|
||||
2 > var
|
||||
3 > p
|
||||
4 > =
|
||||
5 > foo
|
||||
6 > ()
|
||||
7 > .
|
||||
8 > x
|
||||
9 > ;
|
||||
1->Emitted(12, 5) Source(5, 5) + SourceIndex(0)
|
||||
2 >Emitted(12, 9) Source(5, 9) + SourceIndex(0)
|
||||
3 >Emitted(12, 10) Source(5, 10) + SourceIndex(0)
|
||||
4 >Emitted(12, 13) Source(5, 13) + SourceIndex(0)
|
||||
5 >Emitted(12, 16) Source(5, 16) + SourceIndex(0)
|
||||
6 >Emitted(12, 18) Source(5, 18) + SourceIndex(0)
|
||||
7 >Emitted(12, 19) Source(5, 19) + SourceIndex(0)
|
||||
8 >Emitted(12, 20) Source(5, 20) + SourceIndex(0)
|
||||
9 >Emitted(12, 21) Source(5, 21) + SourceIndex(0)
|
||||
---
|
||||
>>>}
|
||||
1 >^
|
||||
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
>}
|
||||
1 >Emitted(13, 2) Source(6, 2) + SourceIndex(0)
|
||||
---
|
||||
>>>//# sourceMappingURL=ES5For-of8.js.map
|
||||
@@ -0,0 +1,14 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of9.ts(4,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of9.ts (1 errors) ====
|
||||
function foo() {
|
||||
return { x: 0 };
|
||||
}
|
||||
for (foo().x of []) {
|
||||
~~~
|
||||
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
for (foo().x of []) {
|
||||
var p = foo().x;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
//// [ES5For-of9.ts]
|
||||
function foo() {
|
||||
return { x: 0 };
|
||||
}
|
||||
for (foo().x of []) {
|
||||
for (foo().x of []) {
|
||||
var p = foo().x;
|
||||
}
|
||||
}
|
||||
|
||||
//// [ES5For-of9.js]
|
||||
function foo() {
|
||||
return {
|
||||
x: 0
|
||||
};
|
||||
}
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
foo().x = _a[_i];
|
||||
for (var _b = 0, _c = []; _b < _c.length; _b++) {
|
||||
foo().x = _c[_b];
|
||||
var p = foo().x;
|
||||
}
|
||||
}
|
||||
@@ -1,2 +1,2 @@
|
||||
//// [computedPropertyNamesSourceMap2_ES5.js.map]
|
||||
{"version":3,"file":"computedPropertyNamesSourceMap2_ES5.js","sourceRoot":"","sources":["computedPropertyNamesSourceMap2_ES5.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,AADA,CAAA,EAAA,GAAA,EAAA;IAAA,EAAA,CAEA,OAAO,CAFA,GAAA;QAGA,QAAQ,CAAC;IACb,CAAC,AAJA;IAAA,EAAA,CAKA,CAAA;IALA,EAAA"}
|
||||
{"version":3,"file":"computedPropertyNamesSourceMap2_ES5.js","sourceRoot":"","sources":["computedPropertyNamesSourceMap2_ES5.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG;OACH,OAAO;QACJ,QAAQ,CAAC;IACb,CAAC;OACJ,CAAA"}
|
||||
@@ -13,144 +13,56 @@ sourceFile:computedPropertyNamesSourceMap2_ES5.ts
|
||||
2 >^^^^
|
||||
3 > ^
|
||||
4 > ^^^
|
||||
5 >
|
||||
6 > ^
|
||||
7 > ^^
|
||||
8 > ^^^
|
||||
9 > ^^
|
||||
10> ^^^^^^^^^^^^^^^^->
|
||||
5 > ^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
2 >var
|
||||
3 > v
|
||||
4 > =
|
||||
5 > !!^^ !!^^ There was decoding error in the sourcemap at this location: Invalid sourceLine found
|
||||
5 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(1, 9) Source(0, 9) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(1, 9) Source(0, NaN) + SourceIndex(0) nameIndex (-1)
|
||||
5 >
|
||||
6 > !!^^ !!^^ There was decoding error in the sourcemap at this location: Unsupported Error Format: No entries after emitted column
|
||||
6 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(1, 9) Source(0, 9) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(1, 10) Source(0, NaN) + SourceIndex(0) nameIndex (-1)
|
||||
6 >
|
||||
7 > !!^^ !!^^ There was decoding error in the sourcemap at this location: Invalid sourceLine found
|
||||
7 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(1, 10) Source(0, 9) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(1, 12) Source(0, NaN) + SourceIndex(0) nameIndex (-1)
|
||||
7 >
|
||||
8 > !!^^ !!^^ There was decoding error in the sourcemap at this location: Unsupported Error Format: No entries after emitted column
|
||||
8 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(1, 10) Source(0, 9) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(1, 15) Source(0, NaN) + SourceIndex(0) nameIndex (-1)
|
||||
8 >
|
||||
9 > !!^^ !!^^ There was decoding error in the sourcemap at this location: Invalid sourceLine found
|
||||
9 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(1, 12) Source(0, 9) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(1, 17) Source(0, NaN) + SourceIndex(0) nameIndex (-1)
|
||||
9 >
|
||||
1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
|
||||
2 >Emitted(1, 5) Source(1, 5) + SourceIndex(0)
|
||||
3 >Emitted(1, 6) Source(1, 6) + SourceIndex(0)
|
||||
4 >Emitted(1, 9) Source(1, 9) + SourceIndex(0)
|
||||
5 >Emitted(1, 9) Source(0, NaN) + SourceIndex(0)
|
||||
6 >Emitted(1, 10) Source(0, NaN) + SourceIndex(0)
|
||||
7 >Emitted(1, 12) Source(0, NaN) + SourceIndex(0)
|
||||
8 >Emitted(1, 15) Source(0, NaN) + SourceIndex(0)
|
||||
9 >Emitted(1, 17) Source(0, NaN) + SourceIndex(0)
|
||||
---
|
||||
>>> _a["hello"] = function () {
|
||||
1->^^^^
|
||||
2 > ^^
|
||||
3 > ^
|
||||
4 > ^^^^^^^
|
||||
5 > ^
|
||||
6 > ^^^
|
||||
1->!!^^ !!^^ There was decoding error in the sourcemap at this location: Unsupported Error Format: No entries after emitted column
|
||||
1->!!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(1, 12) Source(0, 9) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(2, 5) Source(0, NaN) + SourceIndex(0) nameIndex (-1)
|
||||
1->
|
||||
2 > !!^^ !!^^ There was decoding error in the sourcemap at this location: Invalid sourceLine found
|
||||
2 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(1, 15) Source(0, 9) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(2, 7) Source(0, NaN) + SourceIndex(0) nameIndex (-1)
|
||||
2 >
|
||||
3 > !!^^ !!^^ There was decoding error in the sourcemap at this location: Unsupported Error Format: No entries after emitted column
|
||||
3 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(1, 15) Source(0, 9) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(2, 8) Source(2, 6) + SourceIndex(0) nameIndex (-1)
|
||||
3 >
|
||||
4 > !!^^ !!^^ There was decoding error in the sourcemap at this location: Invalid sourceLine found
|
||||
4 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(1, 17) Source(0, 9) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(2, 15) Source(2, 13) + SourceIndex(0) nameIndex (-1)
|
||||
4 > "hello"
|
||||
5 > !!^^ !!^^ There was decoding error in the sourcemap at this location: Unsupported Error Format: No entries after emitted column
|
||||
5 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(1, 17) Source(0, 9) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(2, 16) Source(0, NaN) + SourceIndex(0) nameIndex (-1)
|
||||
5 >
|
||||
6 > !!^^ !!^^ There was decoding error in the sourcemap at this location: Invalid sourceLine found
|
||||
6 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(2, 5) Source(0, 9) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(2, 19) Source(0, NaN) + SourceIndex(0) nameIndex (-1)
|
||||
6 >
|
||||
1->Emitted(2, 5) Source(0, NaN) + SourceIndex(0)
|
||||
2 >Emitted(2, 7) Source(0, NaN) + SourceIndex(0)
|
||||
3 >Emitted(2, 8) Source(2, 6) + SourceIndex(0)
|
||||
4 >Emitted(2, 15) Source(2, 13) + SourceIndex(0)
|
||||
5 >Emitted(2, 16) Source(0, NaN) + SourceIndex(0)
|
||||
6 >Emitted(2, 19) Source(0, NaN) + SourceIndex(0)
|
||||
1->^^^^^^^
|
||||
2 > ^^^^^^^
|
||||
3 > ^^^^->
|
||||
1->{
|
||||
> [
|
||||
2 > "hello"
|
||||
1->Emitted(2, 8) Source(2, 6) + SourceIndex(0)
|
||||
2 >Emitted(2, 15) Source(2, 13) + SourceIndex(0)
|
||||
---
|
||||
>>> debugger;
|
||||
1 >^^^^^^^^
|
||||
1->^^^^^^^^
|
||||
2 > ^^^^^^^^
|
||||
3 > ^
|
||||
1 >!!^^ !!^^ There was decoding error in the sourcemap at this location: Unsupported Error Format: No entries after emitted column
|
||||
1 >!!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(2, 5) Source(0, 9) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(3, 9) Source(3, 9) + SourceIndex(0) nameIndex (-1)
|
||||
1 >
|
||||
2 > !!^^ !!^^ There was decoding error in the sourcemap at this location: Invalid sourceLine found
|
||||
2 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(2, 7) Source(0, 9) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(3, 17) Source(3, 17) + SourceIndex(0) nameIndex (-1)
|
||||
1->]() {
|
||||
>
|
||||
2 > debugger
|
||||
3 > !!^^ !!^^ There was decoding error in the sourcemap at this location: Unsupported Error Format: No entries after emitted column
|
||||
3 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(2, 7) Source(0, 9) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(3, 18) Source(3, 18) + SourceIndex(0) nameIndex (-1)
|
||||
3 > ;
|
||||
1 >Emitted(3, 9) Source(3, 9) + SourceIndex(0)
|
||||
1->Emitted(3, 9) Source(3, 9) + SourceIndex(0)
|
||||
2 >Emitted(3, 17) Source(3, 17) + SourceIndex(0)
|
||||
3 >Emitted(3, 18) Source(3, 18) + SourceIndex(0)
|
||||
---
|
||||
>>> },
|
||||
1 >^^^^
|
||||
2 > ^
|
||||
3 >
|
||||
4 > ^^^^->
|
||||
1 >!!^^ !!^^ The decoded span from sourcemap's mapping entry does not match what was encoded for this span:
|
||||
1 >!!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(2, 8) Source(2, 9) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(4, 5) Source(4, 5) + SourceIndex(0) nameIndex (-1)
|
||||
3 > ^^^^->
|
||||
1 >
|
||||
>
|
||||
2 > !!^^ !!^^ The decoded span from sourcemap's mapping entry does not match what was encoded for this span:
|
||||
2 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(2, 15) Source(2, 16) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(4, 6) Source(4, 6) + SourceIndex(0) nameIndex (-1)
|
||||
2 > }
|
||||
3 > !!^^ !!^^ There was decoding error in the sourcemap at this location: Invalid sourceLine found
|
||||
3 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(2, 16) Source(0, 16) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(4, 6) Source(0, NaN) + SourceIndex(0) nameIndex (-1)
|
||||
3 >
|
||||
1 >Emitted(4, 5) Source(4, 5) + SourceIndex(0)
|
||||
2 >Emitted(4, 6) Source(4, 6) + SourceIndex(0)
|
||||
3 >Emitted(4, 6) Source(0, NaN) + SourceIndex(0)
|
||||
---
|
||||
>>> _a);
|
||||
1->^^^^
|
||||
2 > ^^
|
||||
3 > ^
|
||||
4 > ^
|
||||
1->!!^^ !!^^ There was decoding error in the sourcemap at this location: Unsupported Error Format: No entries after emitted column
|
||||
1->!!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(2, 16) Source(0, 16) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(5, 5) Source(0, NaN) + SourceIndex(0) nameIndex (-1)
|
||||
1->
|
||||
2 > !!^^ !!^^ There was decoding error in the sourcemap at this location: Invalid sourceLine found
|
||||
2 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(2, 19) Source(0, 16) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(5, 7) Source(0, NaN) + SourceIndex(0) nameIndex (-1)
|
||||
2 >
|
||||
3 > !!^^ !!^^ There was decoding error in the sourcemap at this location: Unsupported Error Format: No entries after emitted column
|
||||
3 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(2, 19) Source(0, 16) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(5, 8) Source(5, 2) + SourceIndex(0) nameIndex (-1)
|
||||
3 >
|
||||
4 > !!^^ !!^^ The decoded span from sourcemap's mapping entry does not match what was encoded for this span:
|
||||
4 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(3, 9) Source(3, 16) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(5, 9) Source(5, 2) + SourceIndex(0) nameIndex (-1)
|
||||
4 >
|
||||
1->Emitted(5, 5) Source(0, NaN) + SourceIndex(0)
|
||||
2 >Emitted(5, 7) Source(0, NaN) + SourceIndex(0)
|
||||
3 >Emitted(5, 8) Source(5, 2) + SourceIndex(0)
|
||||
4 >Emitted(5, 9) Source(5, 2) + SourceIndex(0)
|
||||
1->^^^^^^^
|
||||
2 > ^
|
||||
1->
|
||||
>}
|
||||
2 >
|
||||
1->Emitted(5, 8) Source(5, 2) + SourceIndex(0)
|
||||
2 >Emitted(5, 9) Source(5, 2) + SourceIndex(0)
|
||||
---
|
||||
>>>var _a;
|
||||
1 >^^^^
|
||||
2 > ^^
|
||||
3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >!!^^ !!^^ The decoded span from sourcemap's mapping entry does not match what was encoded for this span:
|
||||
1 >!!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(3, 17) Source(3, 24) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(6, 5) Source(0, NaN) + SourceIndex(0) nameIndex (-1)
|
||||
1 >
|
||||
2 > !!^^ !!^^ The decoded span from sourcemap's mapping entry does not match what was encoded for this span:
|
||||
2 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(3, 18) Source(3, 25) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(6, 7) Source(0, NaN) + SourceIndex(0) nameIndex (-1)
|
||||
2 >
|
||||
1 >Emitted(6, 5) Source(0, NaN) + SourceIndex(0)
|
||||
2 >Emitted(6, 7) Source(0, NaN) + SourceIndex(0)
|
||||
---
|
||||
!!!! **** There are more source map entries in the sourceMap's mapping than what was encoded
|
||||
!!!! **** Remaining decoded string: ;IACb,CAAC,AAJA;IAAA,EAAA,CAKA,CAAA;IALA,EAAA
|
||||
>>>//# sourceMappingURL=computedPropertyNamesSourceMap2_ES5.js.map
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/compiler/downlevelLetConst16.ts(189,5): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
tests/cases/compiler/downlevelLetConst16.ts(196,5): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
tests/cases/compiler/downlevelLetConst16.ts(203,5): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
tests/cases/compiler/downlevelLetConst16.ts(210,5): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
tests/cases/compiler/downlevelLetConst16.ts(217,5): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
tests/cases/compiler/downlevelLetConst16.ts(224,5): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
tests/cases/compiler/downlevelLetConst16.ts(188,5): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
tests/cases/compiler/downlevelLetConst16.ts(195,5): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
tests/cases/compiler/downlevelLetConst16.ts(202,5): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
tests/cases/compiler/downlevelLetConst16.ts(209,5): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
tests/cases/compiler/downlevelLetConst16.ts(216,5): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
tests/cases/compiler/downlevelLetConst16.ts(223,5): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
|
||||
|
||||
==== tests/cases/compiler/downlevelLetConst16.ts (6 errors) ====
|
||||
@@ -193,7 +193,6 @@ tests/cases/compiler/downlevelLetConst16.ts(224,5): error TS2482: 'for...of' sta
|
||||
use(x);
|
||||
}
|
||||
|
||||
// TODO: once for-of is supported downlevel
|
||||
function foo7() {
|
||||
for (let x of []) {
|
||||
~~~
|
||||
|
||||
@@ -185,7 +185,6 @@ function foo6() {
|
||||
use(x);
|
||||
}
|
||||
|
||||
// TODO: once for-of is supported downlevel
|
||||
function foo7() {
|
||||
for (let x of []) {
|
||||
use(x);
|
||||
@@ -454,39 +453,44 @@ function foo6() {
|
||||
}
|
||||
use(x);
|
||||
}
|
||||
// TODO: once for-of is supported downlevel
|
||||
function foo7() {
|
||||
for (var _x of []) {
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var _x = _a[_i];
|
||||
use(_x);
|
||||
}
|
||||
use(x);
|
||||
}
|
||||
function foo8() {
|
||||
for (var _x = (void 0)[0] of []) {
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var _x = _a[_i][0];
|
||||
use(_x);
|
||||
}
|
||||
use(x);
|
||||
}
|
||||
function foo9() {
|
||||
for (var _x = (void 0).a of []) {
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var _x = _a[_i].a;
|
||||
use(_x);
|
||||
}
|
||||
use(x);
|
||||
}
|
||||
function foo10() {
|
||||
for (var _x of []) {
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var _x = _a[_i];
|
||||
use(_x);
|
||||
}
|
||||
use(x);
|
||||
}
|
||||
function foo11() {
|
||||
for (var _x = (void 0)[0] of []) {
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var _x = _a[_i][0];
|
||||
use(_x);
|
||||
}
|
||||
use(x);
|
||||
}
|
||||
function foo12() {
|
||||
for (var _x = (void 0).a of []) {
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var _x = _a[_i].a;
|
||||
use(_x);
|
||||
}
|
||||
use(x);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/downlevelLetConst17.ts(66,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
tests/cases/compiler/downlevelLetConst17.ts(65,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
|
||||
|
||||
==== tests/cases/compiler/downlevelLetConst17.ts (1 errors) ====
|
||||
@@ -66,7 +66,6 @@ tests/cases/compiler/downlevelLetConst17.ts(66,1): error TS2482: 'for...of' stat
|
||||
use(x);
|
||||
}
|
||||
|
||||
// TODO: update once for-of statements are supported downlevel
|
||||
for (const x of []) {
|
||||
~~~
|
||||
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
|
||||
|
||||
@@ -63,7 +63,6 @@ for (const x in []) {
|
||||
use(x);
|
||||
}
|
||||
|
||||
// TODO: update once for-of statements are supported downlevel
|
||||
for (const x of []) {
|
||||
use(x);
|
||||
}
|
||||
@@ -118,7 +117,7 @@ for (var _x_10 in []) {
|
||||
for (var _x_11 in []) {
|
||||
use(_x_11);
|
||||
}
|
||||
// TODO: update once for-of statements are supported downlevel
|
||||
for (var _x_12 of []) {
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var _x_12 = _a[_i];
|
||||
use(_x_12);
|
||||
}
|
||||
|
||||
@@ -39,8 +39,8 @@ var Bugs;
|
||||
}
|
||||
var result = message.replace(/\{(\d+)\}/g, function (match) {
|
||||
var rest = [];
|
||||
for (var _i = 1; _i < arguments.length; _i++) {
|
||||
rest[_i - 1] = arguments[_i];
|
||||
for (var _a = 1; _a < arguments.length; _a++) {
|
||||
rest[_a - 1] = arguments[_a];
|
||||
}
|
||||
var index = rest[0];
|
||||
return typeof args[index] !== 'undefined' ? args[index] : match;
|
||||
|
||||
@@ -3,5 +3,6 @@ for (const v of X) {
|
||||
}
|
||||
|
||||
//// [parserES5ForOfStatement10.js]
|
||||
for (var v of X) {
|
||||
for (var _i = 0; _i < X.length; _i++) {
|
||||
var v = X[_i];
|
||||
}
|
||||
|
||||
@@ -3,5 +3,6 @@ for (const [a, b] of X) {
|
||||
}
|
||||
|
||||
//// [parserES5ForOfStatement11.js]
|
||||
for (var _a = void 0, a = _a[0], b = _a[1] of X) {
|
||||
for (var _i = 0; _i < X.length; _i++) {
|
||||
var _a = X[_i], a = _a[0], b = _a[1];
|
||||
}
|
||||
|
||||
@@ -3,5 +3,6 @@ for (const {a, b} of X) {
|
||||
}
|
||||
|
||||
//// [parserES5ForOfStatement12.js]
|
||||
for (var _a = void 0, a = _a.a, b = _a.b of X) {
|
||||
for (var _i = 0; _i < X.length; _i++) {
|
||||
var _a = X[_i], a = _a.a, b = _a.b;
|
||||
}
|
||||
|
||||
@@ -3,5 +3,6 @@ for (let {a, b} of X) {
|
||||
}
|
||||
|
||||
//// [parserES5ForOfStatement13.js]
|
||||
for (var _a = void 0, a = _a.a, b = _a.b of X) {
|
||||
for (var _i = 0; _i < X.length; _i++) {
|
||||
var _a = X[_i], a = _a.a, b = _a.b;
|
||||
}
|
||||
|
||||
@@ -3,5 +3,6 @@ for (let [a, b] of X) {
|
||||
}
|
||||
|
||||
//// [parserES5ForOfStatement14.js]
|
||||
for (var _a = void 0, a = _a[0], b = _a[1] of X) {
|
||||
for (var _i = 0; _i < X.length; _i++) {
|
||||
var _a = X[_i], a = _a[0], b = _a[1];
|
||||
}
|
||||
|
||||
@@ -3,5 +3,6 @@ for (var [a, b] of X) {
|
||||
}
|
||||
|
||||
//// [parserES5ForOfStatement15.js]
|
||||
for (var _a = void 0, a = _a[0], b = _a[1] of X) {
|
||||
for (var _i = 0; _i < X.length; _i++) {
|
||||
var _a = X[_i], a = _a[0], b = _a[1];
|
||||
}
|
||||
|
||||
@@ -3,5 +3,6 @@ for (var {a, b} of X) {
|
||||
}
|
||||
|
||||
//// [parserES5ForOfStatement16.js]
|
||||
for (var _a = void 0, a = _a.a, b = _a.b of X) {
|
||||
for (var _i = 0; _i < X.length; _i++) {
|
||||
var _a = X[_i], a = _a.a, b = _a.b;
|
||||
}
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
for (var of of of) { }
|
||||
|
||||
//// [parserES5ForOfStatement18.js]
|
||||
for (var of of of) {
|
||||
for (var _i = 0; _i < of.length; _i++) {
|
||||
var of = of[_i];
|
||||
}
|
||||
|
||||
@@ -3,5 +3,6 @@ for (var of X) {
|
||||
}
|
||||
|
||||
//// [parserES5ForOfStatement2.js]
|
||||
for ( of X) {
|
||||
for (var _i = 0; _i < X.length; _i++) {
|
||||
var _a = X[_i];
|
||||
}
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
for (var of of) { }
|
||||
|
||||
//// [parserES5ForOfStatement21.js]
|
||||
for ( of of) {
|
||||
for (var _i = 0; _i < of.length; _i++) {
|
||||
var _a = of[_i];
|
||||
}
|
||||
|
||||
@@ -3,5 +3,6 @@ for (var a, b of X) {
|
||||
}
|
||||
|
||||
//// [parserES5ForOfStatement3.js]
|
||||
for (var a of X) {
|
||||
for (var _i = 0; _i < X.length; _i++) {
|
||||
var a = X[_i];
|
||||
}
|
||||
|
||||
@@ -3,5 +3,6 @@ for (var a = 1 of X) {
|
||||
}
|
||||
|
||||
//// [parserES5ForOfStatement4.js]
|
||||
for (var a = 1 of X) {
|
||||
for (var _i = 0; _i < X.length; _i++) {
|
||||
var a = 1 = X[_i];
|
||||
}
|
||||
|
||||
@@ -3,5 +3,6 @@ for (var a: number of X) {
|
||||
}
|
||||
|
||||
//// [parserES5ForOfStatement5.js]
|
||||
for (var a of X) {
|
||||
for (var _i = 0; _i < X.length; _i++) {
|
||||
var a = X[_i];
|
||||
}
|
||||
|
||||
@@ -3,5 +3,6 @@ for (var a = 1, b = 2 of X) {
|
||||
}
|
||||
|
||||
//// [parserES5ForOfStatement6.js]
|
||||
for (var a = 1 of X) {
|
||||
for (var _i = 0; _i < X.length; _i++) {
|
||||
var a = 1 = X[_i];
|
||||
}
|
||||
|
||||
@@ -3,5 +3,6 @@ for (var a: number = 1, b: string = "" of X) {
|
||||
}
|
||||
|
||||
//// [parserES5ForOfStatement7.js]
|
||||
for (var a = 1 of X) {
|
||||
for (var _i = 0; _i < X.length; _i++) {
|
||||
var a = 1 = X[_i];
|
||||
}
|
||||
|
||||
@@ -3,5 +3,6 @@ for (var v of X) {
|
||||
}
|
||||
|
||||
//// [parserES5ForOfStatement8.js]
|
||||
for (var v of X) {
|
||||
for (var _i = 0; _i < X.length; _i++) {
|
||||
var v = X[_i];
|
||||
}
|
||||
|
||||
@@ -3,5 +3,6 @@ for (let v of X) {
|
||||
}
|
||||
|
||||
//// [parserES5ForOfStatement9.js]
|
||||
for (var v of X) {
|
||||
for (var _i = 0; _i < X.length; _i++) {
|
||||
var v = X[_i];
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user