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

Unified Diff: dart/lib/compiler/implementation/ssa/builder.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/ssa/builder.dart
diff --git a/dart/lib/compiler/implementation/ssa/builder.dart b/dart/lib/compiler/implementation/ssa/builder.dart
index 3c14e96c96e250dbd0b8e58796aefaf20127b774..c55d9df5cad17401df3064ae3a325d98411fd106 100644
--- a/dart/lib/compiler/implementation/ssa/builder.dart
+++ b/dart/lib/compiler/implementation/ssa/builder.dart
@@ -970,10 +970,8 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
if (constructor is SynthesizedConstructorElement) return null;
FunctionExpression node = constructor.parseNode(compiler);
// If we know the body doesn't have any code, we don't generate it.
- if (node.body.asBlock() != null) {
- NodeList statements = node.body.asBlock().statements;
- if (statements.isEmpty) return null;
- }
+ if (!node.hasBody()) return null;
+ if (node.hasEmptyBody()) return null;
ClassElement classElement = constructor.getEnclosingClass();
ConstructorBodyElement bodyElement;
for (Link<Element> backendMembers = classElement.backendMembers;
« no previous file with comments | « dart/lib/compiler/implementation/scanner/listener.dart ('k') | dart/lib/compiler/implementation/tree/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698