| Index: sdk/lib/_internal/compiler/implementation/resolution/members.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/resolution/members.dart b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
|
| index cd0cb86ca642233ee7e1e77b81201ec5ed3408f9..c45ecd2d4c2a23e9b0887c5927061b07f9f83de5 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/resolution/members.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
|
| @@ -1243,6 +1243,15 @@ class InitializerResolver {
|
| if (!initializers.tail.isEmpty) {
|
| error(call, MessageKind.REDIRECTING_CONSTRUCTOR_HAS_INITIALIZER);
|
| }
|
| + // Check that there are no field initializing parameters.
|
| + Compiler compiler = visitor.compiler;
|
| + FunctionSignature signature = constructor.computeSignature(compiler);
|
| + signature.forEachParameter((Element parameter) {
|
| + if (parameter.isFieldParameter()) {
|
| + Node node = parameter.parseNode(compiler);
|
| + error(node, MessageKind.INITIALIZING_FORMAL_NOT_ALLOWED);
|
| + }
|
| + });
|
| return resolveSuperOrThisForSend(constructor, functionNode, call);
|
| } else {
|
| visitor.error(call, MessageKind.CONSTRUCTOR_CALL_EXPECTED);
|
| @@ -3763,7 +3772,7 @@ class SignatureResolver extends CommonResolverVisitor<Element> {
|
| error(node, MessageKind.INVALID_PARAMETER);
|
| } else if (!identical(enclosingElement.kind,
|
| ElementKind.GENERATIVE_CONSTRUCTOR)) {
|
| - error(node, MessageKind.FIELD_PARAMETER_NOT_ALLOWED);
|
| + error(node, MessageKind.INITIALIZING_FORMAL_NOT_ALLOWED);
|
| } else {
|
| SourceString name = getParameterName(node);
|
| Element fieldElement = currentClass.lookupLocalMember(name);
|
|
|