| Index: pkg/analyzer/lib/src/generated/parser.dart
|
| diff --git a/pkg/analyzer/lib/src/generated/parser.dart b/pkg/analyzer/lib/src/generated/parser.dart
|
| index 8863fa95e90b0e30cd546d2f4dcb0a9f604f9632..8ec719a7de2a7dba50572859c073aef72a8ca412 100644
|
| --- a/pkg/analyzer/lib/src/generated/parser.dart
|
| +++ b/pkg/analyzer/lib/src/generated/parser.dart
|
| @@ -5459,9 +5459,12 @@ class Parser {
|
| if (constKeyword != null) {
|
| _reportErrorForNode(
|
| ParserErrorCode.CONST_CONSTRUCTOR_WITH_BODY, body);
|
| - } else if (!bodyAllowed) {
|
| + } else if (externalKeyword != null) {
|
| _reportErrorForNode(
|
| ParserErrorCode.EXTERNAL_CONSTRUCTOR_WITH_BODY, body);
|
| + } else if (!bodyAllowed) {
|
| + _reportErrorForNode(
|
| + ParserErrorCode.REDIRECTING_CONSTRUCTOR_WITH_BODY, body);
|
| }
|
| }
|
| }
|
| @@ -9829,6 +9832,10 @@ class ParserErrorCode extends ErrorCode {
|
| const ParserErrorCode('POSITIONAL_PARAMETER_OUTSIDE_GROUP',
|
| "Positional parameters must be enclosed in square brackets ('[' and ']')");
|
|
|
| + static const ParserErrorCode REDIRECTING_CONSTRUCTOR_WITH_BODY =
|
| + const ParserErrorCode('REDIRECTING_CONSTRUCTOR_WITH_BODY',
|
| + "Redirecting constructors cannot have a body");
|
| +
|
| static const ParserErrorCode REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR =
|
| const ParserErrorCode('REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR',
|
| "Only factory constructor can specify '=' redirection.");
|
|
|