| Index: compiler/javatests/com/google/dart/compiler/parser/NegativeParserTest.java
|
| diff --git a/compiler/javatests/com/google/dart/compiler/parser/NegativeParserTest.java b/compiler/javatests/com/google/dart/compiler/parser/NegativeParserTest.java
|
| index f6273143681e30b7317385b46d8fa54503b49bd7..82527ec99cd0e5dfcaeabe2e54698e4412d6d221 100644
|
| --- a/compiler/javatests/com/google/dart/compiler/parser/NegativeParserTest.java
|
| +++ b/compiler/javatests/com/google/dart/compiler/parser/NegativeParserTest.java
|
| @@ -175,9 +175,15 @@ public class NegativeParserTest extends CompilerTestCase {
|
| errEx(ParserErrorCode.DEFAULT_VALUE_CAN_NOT_BE_SPECIFIED_IN_CLOSURE, 1, 41, 5));
|
| }
|
|
|
| - public void test_namedParameterValue_inSetter() {
|
| + public void test_optionalPositionalParameterValue_inSetter() {
|
| parseExpectErrors(
|
| "class A { set f([int b]); }",
|
| + errEx(ParserErrorCode.OPTIONAL_POSITIONAL_PARAMETER_NOT_ALLOWED, 1, 18, 5));
|
| + }
|
| +
|
| + public void test_namedParameterValue_inSetter() {
|
| + parseExpectErrors(
|
| + "class A { set f({int b}); }",
|
| errEx(ParserErrorCode.NAMED_PARAMETER_NOT_ALLOWED, 1, 18, 5));
|
| }
|
|
|
| @@ -187,9 +193,15 @@ public class NegativeParserTest extends CompilerTestCase {
|
| errEx(ParserErrorCode.MISSING_OPTIONAL_PARAMETER_END, 1, 43, 1));
|
| }
|
|
|
| - public void test_namedParameterValue_inOperator() {
|
| + public void test_optionalPositionalParameterValue_inOperator() {
|
| parseExpectErrors(
|
| "class A { operator []=(int a, [int b]); }",
|
| + errEx(ParserErrorCode.OPTIONAL_POSITIONAL_PARAMETER_NOT_ALLOWED, 1, 32, 5));
|
| + }
|
| +
|
| + public void test_namedParameterValue_inOperator() {
|
| + parseExpectErrors(
|
| + "class A { operator []=(int a, {int b}); }",
|
| errEx(ParserErrorCode.NAMED_PARAMETER_NOT_ALLOWED, 1, 32, 5));
|
| }
|
|
|
|
|