| Index: runtime/vm/parser.cc
|
| ===================================================================
|
| --- runtime/vm/parser.cc (revision 15207)
|
| +++ runtime/vm/parser.cc (working copy)
|
| @@ -35,6 +35,8 @@
|
| "Warning on legacy getter syntax");
|
| DEFINE_FLAG(bool, strict_function_literals, false,
|
| "enforce new function literal rules");
|
| +DEFINE_FLAG(bool, fail_legacy_abstract, false,
|
| + "error on explicit use of abstract on class members");
|
|
|
| static void CheckedModeHandler(bool value) {
|
| FLAG_enable_asserts = value;
|
| @@ -2895,6 +2897,9 @@
|
| current_member_ = &member;
|
| if ((CurrentToken() == Token::kABSTRACT) &&
|
| (LookaheadToken(1) != Token::kLPAREN)) {
|
| + if (FLAG_fail_legacy_abstract) {
|
| + ErrorMsg("illegal use of abstract");
|
| + }
|
| ConsumeToken();
|
| member.has_abstract = true;
|
| }
|
|
|