| Index: runtime/vm/parser.cc
|
| ===================================================================
|
| --- runtime/vm/parser.cc (revision 10826)
|
| +++ runtime/vm/parser.cc (working copy)
|
| @@ -3766,13 +3766,13 @@
|
| const intptr_t name_pos = TokenPos();
|
| const String* field_name = ExpectIdentifier("accessor name expected");
|
|
|
| - if (CurrentToken() != Token::kLPAREN) {
|
| - ErrorMsg("'(' expected");
|
| - }
|
| const intptr_t accessor_pos = TokenPos();
|
| ParamList params;
|
| - const bool allow_explicit_default_values = true;
|
| - ParseFormalParameterList(allow_explicit_default_values, ¶ms);
|
| + // TODO(hausner): Remove the ( check once we remove old getter syntax.
|
| + if (!is_getter || (CurrentToken() == Token::kLPAREN)) {
|
| + const bool allow_explicit_default_values = true;
|
| + ParseFormalParameterList(allow_explicit_default_values, ¶ms);
|
| + }
|
| String& accessor_name = String::ZoneHandle();
|
| int expected_num_parameters = -1;
|
| if (is_getter) {
|
|
|