mirror of
https://github.com/dart-lang/sdk
synced 2024-11-05 18:22:09 +00:00
Stop reporting error when not parsing function bodies (issue 23460)
R=scheglov@google.com Review URL: https://codereview.chromium.org//1145733002
This commit is contained in:
parent
1a3e349409
commit
c4a723465b
1 changed files with 3 additions and 1 deletions
|
@ -5066,7 +5066,9 @@ class Parser {
|
|||
externalKeyword == null) {
|
||||
_reportErrorForToken(ParserErrorCode.CONST_FACTORY, factoryKeyword);
|
||||
} else if (body is EmptyFunctionBody) {
|
||||
if (factoryKeyword != null && externalKeyword == null) {
|
||||
if (factoryKeyword != null &&
|
||||
externalKeyword == null &&
|
||||
_parseFunctionBodies) {
|
||||
_reportErrorForToken(
|
||||
ParserErrorCode.FACTORY_WITHOUT_BODY, factoryKeyword);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue