Report error on asterisk token.
This commit is contained in:
parent
5b539f0636
commit
d37368e39f
22 changed files with 78 additions and 86 deletions
|
@ -1155,6 +1155,15 @@ module ts {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function parseOptionalToken(t: SyntaxKind): Node {
|
||||||
|
if (token === t) {
|
||||||
|
var node = createNode(t);
|
||||||
|
nextToken();
|
||||||
|
return finishNode(node);
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
function canParseSemicolon() {
|
function canParseSemicolon() {
|
||||||
// If there's a real semicolon, then we can always parse it out.
|
// If there's a real semicolon, then we can always parse it out.
|
||||||
if (token === SyntaxKind.SemicolonToken) {
|
if (token === SyntaxKind.SemicolonToken) {
|
||||||
|
@ -2202,10 +2211,7 @@ module ts {
|
||||||
|
|
||||||
if (!scanner.hasPrecedingLineBreak() &&
|
if (!scanner.hasPrecedingLineBreak() &&
|
||||||
(token === SyntaxKind.AsteriskToken || isStartOfExpression())) {
|
(token === SyntaxKind.AsteriskToken || isStartOfExpression())) {
|
||||||
if (parseOptional(SyntaxKind.AsteriskToken)) {
|
node.asteriskToken = parseOptionalToken(SyntaxKind.AsteriskToken);
|
||||||
node.flags = NodeFlags.YieldStar;
|
|
||||||
}
|
|
||||||
|
|
||||||
node.expression = parseAssignmentExpression();
|
node.expression = parseAssignmentExpression();
|
||||||
return finishNode(node);
|
return finishNode(node);
|
||||||
}
|
}
|
||||||
|
@ -2255,7 +2261,7 @@ module ts {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// If not, we're probably better off bailing out and returning a bogus function expression.
|
// If not, we're probably better off bailing out and returning a bogus function expression.
|
||||||
return makeFunctionExpression(SyntaxKind.ArrowFunction, pos, /* name */ undefined, sig, createMissingNode());
|
return makeFunctionExpression(SyntaxKind.ArrowFunction, pos, /*asteriskToken:*/ undefined, /*name:*/ undefined, sig, createMissingNode());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2395,7 +2401,7 @@ module ts {
|
||||||
body = parseAssignmentExpression();
|
body = parseAssignmentExpression();
|
||||||
}
|
}
|
||||||
|
|
||||||
return makeFunctionExpression(SyntaxKind.ArrowFunction, pos, /* name */ undefined, sig, body);
|
return makeFunctionExpression(SyntaxKind.ArrowFunction, pos, /*asteriskToken:*/ undefined, /*name:*/ undefined, sig, body);
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseConditionalExpression(): Expression {
|
function parseConditionalExpression(): Expression {
|
||||||
|
@ -2731,26 +2737,23 @@ module ts {
|
||||||
|
|
||||||
function parsePropertyAssignment(): Declaration {
|
function parsePropertyAssignment(): Declaration {
|
||||||
var nodePos = scanner.getStartPos();
|
var nodePos = scanner.getStartPos();
|
||||||
var isGenerator = parseOptional(SyntaxKind.AsteriskToken);
|
var asteriskToken = parseOptionalToken(SyntaxKind.AsteriskToken);
|
||||||
var tokenIsIdentifier = isIdentifier();
|
var tokenIsIdentifier = isIdentifier();
|
||||||
var nameToken = token;
|
var nameToken = token;
|
||||||
var propertyName = parsePropertyName();
|
var propertyName = parsePropertyName();
|
||||||
var node: Declaration;
|
var node: Declaration;
|
||||||
if (isGenerator || token === SyntaxKind.OpenParenToken || token === SyntaxKind.LessThanToken) {
|
if (asteriskToken || token === SyntaxKind.OpenParenToken || token === SyntaxKind.LessThanToken) {
|
||||||
node = <PropertyDeclaration>createNode(SyntaxKind.PropertyAssignment, nodePos);
|
node = <PropertyDeclaration>createNode(SyntaxKind.PropertyAssignment, nodePos);
|
||||||
node.name = propertyName;
|
node.name = propertyName;
|
||||||
if (isGenerator) {
|
var sig = parseSignature(SyntaxKind.CallSignature, SyntaxKind.ColonToken, /* returnTokenRequired */ false, /*yieldAndGeneratorParameterContext:*/ !!asteriskToken);
|
||||||
node.flags |= NodeFlags.Generator;
|
|
||||||
}
|
|
||||||
var sig = parseSignature(SyntaxKind.CallSignature, SyntaxKind.ColonToken, /* returnTokenRequired */ false, /*yieldAndGeneratorParameterContext:*/ isGenerator);
|
|
||||||
|
|
||||||
var body = parseFunctionBlock(isGenerator, /* ignoreMissingOpenBrace */ false);
|
var body = parseFunctionBlock(!!asteriskToken, /* ignoreMissingOpenBrace */ false);
|
||||||
// do not propagate property name as name for function expression
|
// do not propagate property name as name for function expression
|
||||||
// for scenarios like
|
// for scenarios like
|
||||||
// var x = 1;
|
// var x = 1;
|
||||||
// var y = { x() { } }
|
// var y = { x() { } }
|
||||||
// otherwise this will bring y.x into the scope of x which is incorrect
|
// otherwise this will bring y.x into the scope of x which is incorrect
|
||||||
(<PropertyDeclaration>node).initializer = makeFunctionExpression(SyntaxKind.FunctionExpression, node.pos, undefined, sig, body);
|
(<PropertyDeclaration>node).initializer = makeFunctionExpression(SyntaxKind.FunctionExpression, node.pos, asteriskToken, undefined, sig, body);
|
||||||
return finishNode(node);
|
return finishNode(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2808,24 +2811,21 @@ module ts {
|
||||||
|
|
||||||
var pos = getNodePos();
|
var pos = getNodePos();
|
||||||
parseExpected(SyntaxKind.FunctionKeyword);
|
parseExpected(SyntaxKind.FunctionKeyword);
|
||||||
var isGenerator = parseOptional(SyntaxKind.AsteriskToken);
|
var asteriskToken = parseOptionalToken(SyntaxKind.AsteriskToken);
|
||||||
var name = isGenerator ? doInYieldContext(parseOptionalIdentifier) : parseOptionalIdentifier();
|
var name = asteriskToken ? doInYieldContext(parseOptionalIdentifier) : parseOptionalIdentifier();
|
||||||
var sig = parseSignature(SyntaxKind.CallSignature, SyntaxKind.ColonToken, /* returnTokenRequired */ false, /*yieldAndGeneratorParameterContext:*/ isGenerator);
|
var sig = parseSignature(SyntaxKind.CallSignature, SyntaxKind.ColonToken, /* returnTokenRequired */ false, /*yieldAndGeneratorParameterContext:*/ !!asteriskToken);
|
||||||
|
|
||||||
var body = parseFunctionBlock(/*allowYield:*/ isGenerator, /* ignoreMissingOpenBrace */ false);
|
var body = parseFunctionBlock(/*allowYield:*/ !!asteriskToken, /* ignoreMissingOpenBrace */ false);
|
||||||
return makeFunctionExpression(SyntaxKind.FunctionExpression, pos, name, sig, body, isGenerator ? NodeFlags.Generator : undefined);
|
return makeFunctionExpression(SyntaxKind.FunctionExpression, pos, asteriskToken, name, sig, body);
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseOptionalIdentifier() {
|
function parseOptionalIdentifier() {
|
||||||
return isIdentifier() ? parseIdentifier() : undefined;
|
return isIdentifier() ? parseIdentifier() : undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
function makeFunctionExpression(kind: SyntaxKind, pos: number, name: Identifier, sig: ParsedSignature, body: Node, flags?: NodeFlags): FunctionExpression {
|
function makeFunctionExpression(kind: SyntaxKind, pos: number, asteriskToken: Node, name: Identifier, sig: ParsedSignature, body: Node): FunctionExpression {
|
||||||
var node = <FunctionExpression>createNode(kind, pos);
|
var node = <FunctionExpression>createNode(kind, pos);
|
||||||
if (flags) {
|
node.asteriskToken = asteriskToken;
|
||||||
node.flags = flags;
|
|
||||||
}
|
|
||||||
|
|
||||||
node.name = name;
|
node.name = name;
|
||||||
node.typeParameters = sig.typeParameters;
|
node.typeParameters = sig.typeParameters;
|
||||||
node.parameters = sig.parameters;
|
node.parameters = sig.parameters;
|
||||||
|
@ -3292,14 +3292,10 @@ module ts {
|
||||||
var node = <FunctionLikeDeclaration>createNode(SyntaxKind.FunctionDeclaration, fullStart);
|
var node = <FunctionLikeDeclaration>createNode(SyntaxKind.FunctionDeclaration, fullStart);
|
||||||
setModifiers(node, modifiers);
|
setModifiers(node, modifiers);
|
||||||
parseExpected(SyntaxKind.FunctionKeyword);
|
parseExpected(SyntaxKind.FunctionKeyword);
|
||||||
var isGenerator = parseOptional(SyntaxKind.AsteriskToken);
|
node.asteriskToken = parseOptionalToken(SyntaxKind.AsteriskToken);
|
||||||
if (isGenerator) {
|
|
||||||
node.flags |= NodeFlags.Generator;
|
|
||||||
}
|
|
||||||
|
|
||||||
node.name = parseIdentifier();
|
node.name = parseIdentifier();
|
||||||
fillSignature(SyntaxKind.CallSignature, SyntaxKind.ColonToken, /* returnTokenRequired */ false, /*yieldAndGeneratorParameterContext:*/ isGenerator, node);
|
fillSignature(SyntaxKind.CallSignature, SyntaxKind.ColonToken, /* returnTokenRequired */ false, /*yieldAndGeneratorParameterContext:*/ !!node.asteriskToken, node);
|
||||||
node.body = parseFunctionBlockOrSemicolon(isGenerator);
|
node.body = parseFunctionBlockOrSemicolon(!!node.asteriskToken);
|
||||||
return finishNode(node);
|
return finishNode(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3314,11 +3310,7 @@ module ts {
|
||||||
|
|
||||||
function parsePropertyMemberDeclaration(fullStart: number, modifiers: ModifiersArray): Declaration {
|
function parsePropertyMemberDeclaration(fullStart: number, modifiers: ModifiersArray): Declaration {
|
||||||
var flags = modifiers ? modifiers.flags : 0;
|
var flags = modifiers ? modifiers.flags : 0;
|
||||||
var isGenerator = parseOptional(SyntaxKind.AsteriskToken);
|
var asteriskToken = parseOptionalToken(SyntaxKind.AsteriskToken);
|
||||||
if (isGenerator) {
|
|
||||||
flags |= NodeFlags.Generator;
|
|
||||||
}
|
|
||||||
|
|
||||||
var name = parsePropertyName();
|
var name = parsePropertyName();
|
||||||
if (parseOptional(SyntaxKind.QuestionToken)) {
|
if (parseOptional(SyntaxKind.QuestionToken)) {
|
||||||
// Note: this is not legal as per the grammar. But we allow it in the parser and
|
// Note: this is not legal as per the grammar. But we allow it in the parser and
|
||||||
|
@ -3326,15 +3318,16 @@ module ts {
|
||||||
flags |= NodeFlags.QuestionMark;
|
flags |= NodeFlags.QuestionMark;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isGenerator || token === SyntaxKind.OpenParenToken || token === SyntaxKind.LessThanToken) {
|
if (asteriskToken || token === SyntaxKind.OpenParenToken || token === SyntaxKind.LessThanToken) {
|
||||||
var method = <MethodDeclaration>createNode(SyntaxKind.Method, fullStart);
|
var method = <MethodDeclaration>createNode(SyntaxKind.Method, fullStart);
|
||||||
setModifiers(method, modifiers);
|
setModifiers(method, modifiers);
|
||||||
if (flags) {
|
if (flags) {
|
||||||
method.flags = flags;
|
method.flags = flags;
|
||||||
}
|
}
|
||||||
|
method.asteriskToken = asteriskToken;
|
||||||
method.name = name;
|
method.name = name;
|
||||||
fillSignature(SyntaxKind.CallSignature, SyntaxKind.ColonToken, /* returnTokenRequired */ false, /*yieldAndGeneratorParameterContext:*/ isGenerator, method);
|
fillSignature(SyntaxKind.CallSignature, SyntaxKind.ColonToken, /* returnTokenRequired */ false, /*yieldAndGeneratorParameterContext:*/ !!asteriskToken, method);
|
||||||
method.body = parseFunctionBlockOrSemicolon(isGenerator);
|
method.body = parseFunctionBlockOrSemicolon(!!asteriskToken);
|
||||||
return finishNode(method);
|
return finishNode(method);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -4306,9 +4299,9 @@ module ts {
|
||||||
checkForGenerator(node);
|
checkForGenerator(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkForGenerator(node: Node) {
|
function checkForGenerator(node: FunctionLikeDeclaration) {
|
||||||
if (node.flags & NodeFlags.Generator) {
|
if (node.asteriskToken) {
|
||||||
return grammarErrorOnFirstToken(node, Diagnostics.generators_are_not_currently_supported);
|
return grammarErrorOnNode(node.asteriskToken, Diagnostics.generators_are_not_currently_supported);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4741,8 +4734,7 @@ module ts {
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkPropertyAssignment(node: PropertyDeclaration) {
|
function checkPropertyAssignment(node: PropertyDeclaration) {
|
||||||
return checkForInvalidQuestionMark(node, Diagnostics.An_object_member_cannot_be_declared_optional) ||
|
return checkForInvalidQuestionMark(node, Diagnostics.An_object_member_cannot_be_declared_optional);
|
||||||
checkForGenerator(node);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkForInvalidQuestionMark(node: Declaration, message: DiagnosticMessage) {
|
function checkForInvalidQuestionMark(node: Declaration, message: DiagnosticMessage) {
|
||||||
|
|
|
@ -271,8 +271,6 @@ module ts {
|
||||||
Let = 0x00000800, // Variable declaration
|
Let = 0x00000800, // Variable declaration
|
||||||
Const = 0x00001000, // Variable declaration
|
Const = 0x00001000, // Variable declaration
|
||||||
OctalLiteral = 0x00002000,
|
OctalLiteral = 0x00002000,
|
||||||
Generator = 0x00004000,
|
|
||||||
YieldStar = 0x00008000,
|
|
||||||
|
|
||||||
Modifier = Export | Ambient | Public | Private | Protected | Static,
|
Modifier = Export | Ambient | Public | Private | Protected | Static,
|
||||||
AccessibilityModifier = Public | Private | Protected,
|
AccessibilityModifier = Public | Private | Protected,
|
||||||
|
@ -377,6 +375,7 @@ module ts {
|
||||||
* FunctionExpression
|
* FunctionExpression
|
||||||
*/
|
*/
|
||||||
export interface FunctionLikeDeclaration extends Declaration, ParsedSignature {
|
export interface FunctionLikeDeclaration extends Declaration, ParsedSignature {
|
||||||
|
asteriskToken?: Node;
|
||||||
body?: Block | Expression;
|
body?: Block | Expression;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -442,6 +441,7 @@ module ts {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface YieldExpression extends Expression {
|
export interface YieldExpression extends Expression {
|
||||||
|
asteriskToken?: Node;
|
||||||
expression: Expression;
|
expression: Expression;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts(1,1): error TS9001: 'generators' are not currently supported.
|
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts(1,10): error TS9001: 'generators' are not currently supported.
|
||||||
|
|
||||||
|
|
||||||
==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts (1 errors) ====
|
==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts (1 errors) ====
|
||||||
function * foo(a = yield => yield) {
|
function * foo(a = yield => yield) {
|
||||||
~~~~~~~~
|
~
|
||||||
!!! error TS9001: 'generators' are not currently supported.
|
!!! error TS9001: 'generators' are not currently supported.
|
||||||
}
|
}
|
|
@ -1,8 +1,8 @@
|
||||||
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration11_es6.ts(1,1): error TS9001: 'generators' are not currently supported.
|
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration11_es6.ts(1,10): error TS9001: 'generators' are not currently supported.
|
||||||
|
|
||||||
|
|
||||||
==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration11_es6.ts (1 errors) ====
|
==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration11_es6.ts (1 errors) ====
|
||||||
function * yield() {
|
function * yield() {
|
||||||
~~~~~~~~
|
~
|
||||||
!!! error TS9001: 'generators' are not currently supported.
|
!!! error TS9001: 'generators' are not currently supported.
|
||||||
}
|
}
|
|
@ -1,10 +1,10 @@
|
||||||
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration13_es6.ts(1,1): error TS9001: 'generators' are not currently supported.
|
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration13_es6.ts(1,10): error TS9001: 'generators' are not currently supported.
|
||||||
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration13_es6.ts(3,11): error TS2304: Cannot find name 'yield'.
|
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration13_es6.ts(3,11): error TS2304: Cannot find name 'yield'.
|
||||||
|
|
||||||
|
|
||||||
==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration13_es6.ts (2 errors) ====
|
==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration13_es6.ts (2 errors) ====
|
||||||
function * foo() {
|
function * foo() {
|
||||||
~~~~~~~~
|
~
|
||||||
!!! error TS9001: 'generators' are not currently supported.
|
!!! error TS9001: 'generators' are not currently supported.
|
||||||
// Legal to use 'yield' in a type context.
|
// Legal to use 'yield' in a type context.
|
||||||
var v: yield;
|
var v: yield;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration1_es6.ts(1,1): error TS9001: 'generators' are not currently supported.
|
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration1_es6.ts(1,10): error TS9001: 'generators' are not currently supported.
|
||||||
|
|
||||||
|
|
||||||
==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration1_es6.ts (1 errors) ====
|
==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration1_es6.ts (1 errors) ====
|
||||||
function * foo() {
|
function * foo() {
|
||||||
~~~~~~~~
|
~
|
||||||
!!! error TS9001: 'generators' are not currently supported.
|
!!! error TS9001: 'generators' are not currently supported.
|
||||||
}
|
}
|
|
@ -1,10 +1,10 @@
|
||||||
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration6_es6.ts(1,1): error TS9001: 'generators' are not currently supported.
|
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration6_es6.ts(1,9): error TS9001: 'generators' are not currently supported.
|
||||||
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration6_es6.ts(1,18): error TS2304: Cannot find name 'yield'.
|
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration6_es6.ts(1,18): error TS2304: Cannot find name 'yield'.
|
||||||
|
|
||||||
|
|
||||||
==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration6_es6.ts (2 errors) ====
|
==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration6_es6.ts (2 errors) ====
|
||||||
function*foo(a = yield) {
|
function*foo(a = yield) {
|
||||||
~~~~~~~~
|
~
|
||||||
!!! error TS9001: 'generators' are not currently supported.
|
!!! error TS9001: 'generators' are not currently supported.
|
||||||
~~~~~
|
~~~~~
|
||||||
!!! error TS2304: Cannot find name 'yield'.
|
!!! error TS2304: Cannot find name 'yield'.
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts(1,1): error TS9001: 'generators' are not currently supported.
|
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts(1,9): error TS9001: 'generators' are not currently supported.
|
||||||
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts(3,20): error TS2304: Cannot find name 'yield'.
|
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts(3,20): error TS2304: Cannot find name 'yield'.
|
||||||
|
|
||||||
|
|
||||||
==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts (2 errors) ====
|
==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts (2 errors) ====
|
||||||
function*bar() {
|
function*bar() {
|
||||||
~~~~~~~~
|
~
|
||||||
!!! error TS9001: 'generators' are not currently supported.
|
!!! error TS9001: 'generators' are not currently supported.
|
||||||
// 'yield' here is an identifier, and not a yield expression.
|
// 'yield' here is an identifier, and not a yield expression.
|
||||||
function*foo(a = yield) {
|
function*foo(a = yield) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
tests/cases/conformance/es6/functionExpressions/FunctionExpression1_es6.ts(1,9): error TS9001: 'generators' are not currently supported.
|
tests/cases/conformance/es6/functionExpressions/FunctionExpression1_es6.ts(1,18): error TS9001: 'generators' are not currently supported.
|
||||||
|
|
||||||
|
|
||||||
==== tests/cases/conformance/es6/functionExpressions/FunctionExpression1_es6.ts (1 errors) ====
|
==== tests/cases/conformance/es6/functionExpressions/FunctionExpression1_es6.ts (1 errors) ====
|
||||||
var v = function * () { }
|
var v = function * () { }
|
||||||
~~~~~~~~
|
~
|
||||||
!!! error TS9001: 'generators' are not currently supported.
|
!!! error TS9001: 'generators' are not currently supported.
|
|
@ -1,7 +1,7 @@
|
||||||
tests/cases/conformance/es6/functionExpressions/FunctionExpression2_es6.ts(1,9): error TS9001: 'generators' are not currently supported.
|
tests/cases/conformance/es6/functionExpressions/FunctionExpression2_es6.ts(1,18): error TS9001: 'generators' are not currently supported.
|
||||||
|
|
||||||
|
|
||||||
==== tests/cases/conformance/es6/functionExpressions/FunctionExpression2_es6.ts (1 errors) ====
|
==== tests/cases/conformance/es6/functionExpressions/FunctionExpression2_es6.ts (1 errors) ====
|
||||||
var v = function * foo() { }
|
var v = function * foo() { }
|
||||||
~~~~~~~~
|
~
|
||||||
!!! error TS9001: 'generators' are not currently supported.
|
!!! error TS9001: 'generators' are not currently supported.
|
|
@ -1,9 +1,9 @@
|
||||||
tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration2_es6.ts(2,4): error TS9001: 'generators' are not currently supported.
|
tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration2_es6.ts(2,11): error TS9001: 'generators' are not currently supported.
|
||||||
|
|
||||||
|
|
||||||
==== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration2_es6.ts (1 errors) ====
|
==== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration2_es6.ts (1 errors) ====
|
||||||
class C {
|
class C {
|
||||||
public * foo() { }
|
public * foo() { }
|
||||||
~~~~~~
|
~
|
||||||
!!! error TS9001: 'generators' are not currently supported.
|
!!! error TS9001: 'generators' are not currently supported.
|
||||||
}
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
tests/cases/conformance/es6/yieldExpressions/YieldExpression13_es6.ts(1,1): error TS9001: 'generators' are not currently supported.
|
tests/cases/conformance/es6/yieldExpressions/YieldExpression13_es6.ts(1,9): error TS9001: 'generators' are not currently supported.
|
||||||
|
|
||||||
|
|
||||||
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression13_es6.ts (1 errors) ====
|
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression13_es6.ts (1 errors) ====
|
||||||
function* foo() { yield }
|
function* foo() { yield }
|
||||||
~~~~~~~~
|
~
|
||||||
!!! error TS9001: 'generators' are not currently supported.
|
!!! error TS9001: 'generators' are not currently supported.
|
|
@ -1,9 +1,9 @@
|
||||||
tests/cases/conformance/es6/yieldExpressions/YieldExpression16_es6.ts(1,1): error TS9001: 'generators' are not currently supported.
|
tests/cases/conformance/es6/yieldExpressions/YieldExpression16_es6.ts(1,9): error TS9001: 'generators' are not currently supported.
|
||||||
|
|
||||||
|
|
||||||
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression16_es6.ts (1 errors) ====
|
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression16_es6.ts (1 errors) ====
|
||||||
function* foo() {
|
function* foo() {
|
||||||
~~~~~~~~
|
~
|
||||||
!!! error TS9001: 'generators' are not currently supported.
|
!!! error TS9001: 'generators' are not currently supported.
|
||||||
function bar() {
|
function bar() {
|
||||||
yield foo;
|
yield foo;
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
tests/cases/conformance/es6/yieldExpressions/YieldExpression19_es6.ts(1,1): error TS9001: 'generators' are not currently supported.
|
tests/cases/conformance/es6/yieldExpressions/YieldExpression19_es6.ts(1,9): error TS9001: 'generators' are not currently supported.
|
||||||
|
|
||||||
|
|
||||||
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression19_es6.ts (1 errors) ====
|
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression19_es6.ts (1 errors) ====
|
||||||
function*foo() {
|
function*foo() {
|
||||||
~~~~~~~~
|
~
|
||||||
!!! error TS9001: 'generators' are not currently supported.
|
!!! error TS9001: 'generators' are not currently supported.
|
||||||
function bar() {
|
function bar() {
|
||||||
function* quux() {
|
function* quux() {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
tests/cases/conformance/es6/yieldExpressions/YieldExpression3_es6.ts(1,1): error TS9001: 'generators' are not currently supported.
|
tests/cases/conformance/es6/yieldExpressions/YieldExpression3_es6.ts(1,9): error TS9001: 'generators' are not currently supported.
|
||||||
|
|
||||||
|
|
||||||
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression3_es6.ts (1 errors) ====
|
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression3_es6.ts (1 errors) ====
|
||||||
function* foo() {
|
function* foo() {
|
||||||
~~~~~~~~
|
~
|
||||||
!!! error TS9001: 'generators' are not currently supported.
|
!!! error TS9001: 'generators' are not currently supported.
|
||||||
yield
|
yield
|
||||||
yield
|
yield
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
tests/cases/conformance/es6/yieldExpressions/YieldExpression4_es6.ts(1,1): error TS9001: 'generators' are not currently supported.
|
tests/cases/conformance/es6/yieldExpressions/YieldExpression4_es6.ts(1,9): error TS9001: 'generators' are not currently supported.
|
||||||
|
|
||||||
|
|
||||||
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression4_es6.ts (1 errors) ====
|
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression4_es6.ts (1 errors) ====
|
||||||
function* foo() {
|
function* foo() {
|
||||||
~~~~~~~~
|
~
|
||||||
!!! error TS9001: 'generators' are not currently supported.
|
!!! error TS9001: 'generators' are not currently supported.
|
||||||
yield;
|
yield;
|
||||||
yield;
|
yield;
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
tests/cases/conformance/es6/yieldExpressions/YieldExpression6_es6.ts(1,1): error TS9001: 'generators' are not currently supported.
|
tests/cases/conformance/es6/yieldExpressions/YieldExpression6_es6.ts(1,9): error TS9001: 'generators' are not currently supported.
|
||||||
|
|
||||||
|
|
||||||
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression6_es6.ts (1 errors) ====
|
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression6_es6.ts (1 errors) ====
|
||||||
function* foo() {
|
function* foo() {
|
||||||
~~~~~~~~
|
~
|
||||||
!!! error TS9001: 'generators' are not currently supported.
|
!!! error TS9001: 'generators' are not currently supported.
|
||||||
yield*foo
|
yield*foo
|
||||||
}
|
}
|
|
@ -1,9 +1,9 @@
|
||||||
tests/cases/conformance/es6/yieldExpressions/YieldExpression7_es6.ts(1,1): error TS9001: 'generators' are not currently supported.
|
tests/cases/conformance/es6/yieldExpressions/YieldExpression7_es6.ts(1,9): error TS9001: 'generators' are not currently supported.
|
||||||
|
|
||||||
|
|
||||||
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression7_es6.ts (1 errors) ====
|
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression7_es6.ts (1 errors) ====
|
||||||
function* foo() {
|
function* foo() {
|
||||||
~~~~~~~~
|
~
|
||||||
!!! error TS9001: 'generators' are not currently supported.
|
!!! error TS9001: 'generators' are not currently supported.
|
||||||
yield foo
|
yield foo
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
tests/cases/conformance/es6/yieldExpressions/YieldExpression8_es6.ts(2,1): error TS9001: 'generators' are not currently supported.
|
tests/cases/conformance/es6/yieldExpressions/YieldExpression8_es6.ts(2,9): error TS9001: 'generators' are not currently supported.
|
||||||
tests/cases/conformance/es6/yieldExpressions/YieldExpression8_es6.ts(1,1): error TS2304: Cannot find name 'yield'.
|
tests/cases/conformance/es6/yieldExpressions/YieldExpression8_es6.ts(1,1): error TS2304: Cannot find name 'yield'.
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ tests/cases/conformance/es6/yieldExpressions/YieldExpression8_es6.ts(1,1): error
|
||||||
~~~~~
|
~~~~~
|
||||||
!!! error TS2304: Cannot find name 'yield'.
|
!!! error TS2304: Cannot find name 'yield'.
|
||||||
function* foo() {
|
function* foo() {
|
||||||
~~~~~~~~
|
~
|
||||||
!!! error TS9001: 'generators' are not currently supported.
|
!!! error TS9001: 'generators' are not currently supported.
|
||||||
yield(foo);
|
yield(foo);
|
||||||
}
|
}
|
|
@ -1,9 +1,9 @@
|
||||||
tests/cases/conformance/es6/yieldExpressions/YieldExpression9_es6.ts(1,9): error TS9001: 'generators' are not currently supported.
|
tests/cases/conformance/es6/yieldExpressions/YieldExpression9_es6.ts(1,17): error TS9001: 'generators' are not currently supported.
|
||||||
|
|
||||||
|
|
||||||
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression9_es6.ts (1 errors) ====
|
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression9_es6.ts (1 errors) ====
|
||||||
var v = function*() {
|
var v = function*() {
|
||||||
~~~~~~~~
|
~
|
||||||
!!! error TS9001: 'generators' are not currently supported.
|
!!! error TS9001: 'generators' are not currently supported.
|
||||||
yield(foo);
|
yield(foo);
|
||||||
}
|
}
|
|
@ -1,9 +1,9 @@
|
||||||
tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts(1,1): error TS9001: 'generators' are not currently supported.
|
tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts(1,9): error TS9001: 'generators' are not currently supported.
|
||||||
|
|
||||||
|
|
||||||
==== tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts (1 errors) ====
|
==== tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts (1 errors) ====
|
||||||
function* gen() {
|
function* gen() {
|
||||||
~~~~~~~~
|
~
|
||||||
!!! error TS9001: 'generators' are not currently supported.
|
!!! error TS9001: 'generators' are not currently supported.
|
||||||
// Once this is supported, the inner expression does not need to be parenthesized.
|
// Once this is supported, the inner expression does not need to be parenthesized.
|
||||||
var x = yield `abc${ x }def`;
|
var x = yield `abc${ x }def`;
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts(1,1): error TS9001: 'generators' are not currently supported.
|
tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts(1,9): error TS9001: 'generators' are not currently supported.
|
||||||
|
|
||||||
|
|
||||||
==== tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts (1 errors) ====
|
==== tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts (1 errors) ====
|
||||||
function* gen() {
|
function* gen() {
|
||||||
~~~~~~~~
|
~
|
||||||
!!! error TS9001: 'generators' are not currently supported.
|
!!! error TS9001: 'generators' are not currently supported.
|
||||||
// Once this is supported, yield *must* be parenthesized.
|
// Once this is supported, yield *must* be parenthesized.
|
||||||
var x = `abc${ yield 10 }def`;
|
var x = `abc${ yield 10 }def`;
|
||||||
|
|
Loading…
Reference in a new issue