| Index: pkg/analyzer/test/generated/parser_test.dart
|
| diff --git a/pkg/analyzer/test/generated/parser_test.dart b/pkg/analyzer/test/generated/parser_test.dart
|
| index b673ec4c986b9784261c2358c8f33abbfe7e24dc..710be9b836ef5c5038ab7409b5f95b6b923ec6ed 100644
|
| --- a/pkg/analyzer/test/generated/parser_test.dart
|
| +++ b/pkg/analyzer/test/generated/parser_test.dart
|
| @@ -1510,27 +1510,6 @@ class Foo {
|
| reason: 'parser recovers what it can');
|
| }
|
|
|
| - void test_method_invalidTypeParameters() {
|
| - // TODO(jmesserly): ideally we'd be better at parser recovery here.
|
| - // It doesn't try to advance past the invalid token `!` to find the
|
| - // valid `>`. If it did we'd get less cascading errors, at least for this
|
| - // particular example.
|
| - enableGenericMethods = true;
|
| - MethodDeclaration method = parse3(
|
| - "parseClassMember",
|
| - <Object>["C"],
|
| - "void m<E, hello!>() {}",
|
| - [
|
| - ParserErrorCode.EXPECTED_TOKEN /*>*/,
|
| - ParserErrorCode.MISSING_IDENTIFIER,
|
| - ParserErrorCode.EXPECTED_TOKEN /*(*/,
|
| - ParserErrorCode.EXPECTED_TOKEN /*)*/,
|
| - ParserErrorCode.MISSING_FUNCTION_BODY
|
| - ]);
|
| - expect(method.typeParameters.toString(), '<E, hello>',
|
| - reason: 'parser recovers what it can');
|
| - }
|
| -
|
| void test_method_invalidTypeParameterExtends() {
|
| // Regression test for https://github.com/dart-lang/sdk/issues/25739.
|
|
|
| @@ -1550,7 +1529,6 @@ class Foo {
|
| reason: 'parser recovers what it can');
|
| }
|
|
|
| -
|
| void test_method_invalidTypeParameterExtendsComment() {
|
| // Regression test for https://github.com/dart-lang/sdk/issues/25739.
|
|
|
| @@ -1575,6 +1553,27 @@ class Foo {
|
| reason: 'parser recovers what it can');
|
| }
|
|
|
| + void test_method_invalidTypeParameters() {
|
| + // TODO(jmesserly): ideally we'd be better at parser recovery here.
|
| + // It doesn't try to advance past the invalid token `!` to find the
|
| + // valid `>`. If it did we'd get less cascading errors, at least for this
|
| + // particular example.
|
| + enableGenericMethods = true;
|
| + MethodDeclaration method = parse3(
|
| + "parseClassMember",
|
| + <Object>["C"],
|
| + "void m<E, hello!>() {}",
|
| + [
|
| + ParserErrorCode.EXPECTED_TOKEN /*>*/,
|
| + ParserErrorCode.MISSING_IDENTIFIER,
|
| + ParserErrorCode.EXPECTED_TOKEN /*(*/,
|
| + ParserErrorCode.EXPECTED_TOKEN /*)*/,
|
| + ParserErrorCode.MISSING_FUNCTION_BODY
|
| + ]);
|
| + expect(method.typeParameters.toString(), '<E, hello>',
|
| + reason: 'parser recovers what it can');
|
| + }
|
| +
|
| void test_missingAssignableSelector_identifiersAssigned() {
|
| parseExpression("x.y = y;");
|
| }
|
| @@ -1948,6 +1947,16 @@ class Foo {
|
| [ParserErrorCode.POSITIONAL_PARAMETER_OUTSIDE_GROUP]);
|
| }
|
|
|
| + void test_redirectingConstructorWithBody_named() {
|
| + parse3("parseClassMember", <Object>["C"], "C.x() : this() {}",
|
| + [ParserErrorCode.REDIRECTING_CONSTRUCTOR_WITH_BODY]);
|
| + }
|
| +
|
| + void test_redirectingConstructorWithBody_unnamed() {
|
| + parse3("parseClassMember", <Object>["C"], "C() : this.x() {}",
|
| + [ParserErrorCode.REDIRECTING_CONSTRUCTOR_WITH_BODY]);
|
| + }
|
| +
|
| void test_redirectionInNonFactoryConstructor() {
|
| parse3("parseClassMember", <Object>["C"], "C() = D;",
|
| [ParserErrorCode.REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR]);
|
|
|