Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Unified Diff: pkg/analyzer/lib/src/generated/parser.dart

Issue 1059753005: Stop generating error when ignoring function bodies (issue 23207) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/parser_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/parser.dart
diff --git a/pkg/analyzer/lib/src/generated/parser.dart b/pkg/analyzer/lib/src/generated/parser.dart
index 609fb17f954f41f159e70aa0367c1b94f72729c7..89ae664659ed85cf014a7a85246176b1d40e72b3 100644
--- a/pkg/analyzer/lib/src/generated/parser.dart
+++ b/pkg/analyzer/lib/src/generated/parser.dart
@@ -423,6 +423,9 @@ Object invokeParserMethodImpl(
parser.currentToken = tokenStream;
MethodTrampoline method =
methodTable_Parser['${methodName}_${objects.length}'];
+ if (method == null) {
+ throw new IllegalArgumentException('There is no method named $methodName');
+ }
return method.invoke(parser, objects);
}
@@ -6234,7 +6237,7 @@ class Parser {
_reportErrorForNode(ParserErrorCode.EXTERNAL_METHOD_WITH_BODY, body);
}
} else if (staticKeyword != null) {
- if (body is EmptyFunctionBody) {
+ if (body is EmptyFunctionBody && _parseFunctionBodies) {
_reportErrorForNode(ParserErrorCode.ABSTRACT_STATIC_METHOD, body);
}
}
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/parser_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698