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

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

Issue 781133002: Fix for issue 4070 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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 013ff4603e0d59aa41c2281ac52dc456858b9c1c..07ef20ea86ca9002c5c292c2b36e0b7aafb2f370 100644
--- a/pkg/analyzer/lib/src/generated/parser.dart
+++ b/pkg/analyzer/lib/src/generated/parser.dart
@@ -6561,6 +6561,11 @@ class Parser {
}
}
Token functionDefinition = andAdvance;
+ if (_matchesKeyword(Keyword.RETURN)) {
+ _reportErrorForToken(
+ ParserErrorCode.UNEXPECTED_TOKEN,
+ andAdvance);
+ }
Expression expression = parseExpression2();
Token semicolon = null;
if (!inExpression) {
« 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