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

Unified Diff: dart/lib/compiler/implementation/scanner/listener.dart

Issue 11348037: A method or accessor with empty body is implicitly abstract. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Changes to make unit tests pass Created 8 years, 2 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
Index: dart/lib/compiler/implementation/scanner/listener.dart
diff --git a/dart/lib/compiler/implementation/scanner/listener.dart b/dart/lib/compiler/implementation/scanner/listener.dart
index c5297c9ba97ac64735932dc74862ad754b74a3f8..ae3453b7986bf1095902d3ae0a50fcf8c2f1d4ca 100644
--- a/dart/lib/compiler/implementation/scanner/listener.dart
+++ b/dart/lib/compiler/implementation/scanner/listener.dart
@@ -1387,7 +1387,11 @@ class NodeListener extends ElementListener {
}
void endFunctionBody(int count, Token beginToken, Token endToken) {
- pushNode(new Block(makeNodeList(count, beginToken, endToken, null)));
+ if (count == 0 && beginToken == null) {
+ pushNode(new EmptyStatement(endToken));
+ } else {
+ pushNode(new Block(makeNodeList(count, beginToken, endToken, null)));
+ }
}
void handleNoFunctionBody(Token token) {
« no previous file with comments | « dart/lib/compiler/implementation/js_backend/emitter.dart ('k') | dart/lib/compiler/implementation/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698