| Index: compiler/java/com/google/dart/compiler/parser/DartParser.java
|
| diff --git a/compiler/java/com/google/dart/compiler/parser/DartParser.java b/compiler/java/com/google/dart/compiler/parser/DartParser.java
|
| index 4b51d39f83f3ade150d3b54369d9ab355149b112..9b206f9c869092ee62ae852769976e420628ed96 100644
|
| --- a/compiler/java/com/google/dart/compiler/parser/DartParser.java
|
| +++ b/compiler/java/com/google/dart/compiler/parser/DartParser.java
|
| @@ -1709,6 +1709,9 @@ public class DartParser extends CompletionHooksParserBase {
|
| }
|
| // In methods with required arity each parameter is required.
|
| for (DartParameter parameter : parameters) {
|
| + if (parameter.getModifiers().isOptional()) {
|
| + reportError(parameter, ParserErrorCode.OPTIONAL_POSITIONAL_PARAMETER_NOT_ALLOWED);
|
| + }
|
| if (parameter.getModifiers().isNamed()) {
|
| reportError(parameter, ParserErrorCode.NAMED_PARAMETER_NOT_ALLOWED);
|
| }
|
| @@ -2139,8 +2142,6 @@ public class DartParser extends CompletionHooksParserBase {
|
|
|
| if (isOptional) {
|
| modifiers = modifiers.makeOptional();
|
| - // TODO(brianwilkerson) Remove the line below when we no longer need to support the old syntax.
|
| - modifiers = modifiers.makeNamed();
|
| }
|
| if (isNamed) {
|
| modifiers = modifiers.makeNamed();
|
|
|