Index: compiler/java/com/google/dart/compiler/resolver/Resolver.java |
diff --git a/compiler/java/com/google/dart/compiler/resolver/Resolver.java b/compiler/java/com/google/dart/compiler/resolver/Resolver.java |
index 005fba3f4cb2176e2724384840d7c4ce58a91505..3623f3c172e933e91b438cf85e473eeed0f8d6aa 100644 |
--- a/compiler/java/com/google/dart/compiler/resolver/Resolver.java |
+++ b/compiler/java/com/google/dart/compiler/resolver/Resolver.java |
@@ -39,6 +39,7 @@ import com.google.dart.compiler.ast.DartMapLiteral; |
import com.google.dart.compiler.ast.DartMethodDefinition; |
import com.google.dart.compiler.ast.DartMethodInvocation; |
import com.google.dart.compiler.ast.DartNamedExpression; |
+import com.google.dart.compiler.ast.DartNativeBlock; |
import com.google.dart.compiler.ast.DartNewExpression; |
import com.google.dart.compiler.ast.DartNode; |
import com.google.dart.compiler.ast.DartParameter; |
@@ -595,7 +596,8 @@ public class Resolver { |
} |
} |
- if ((functionNode.getBody() == null) |
+ DartBlock body = functionNode.getBody(); |
+ if (body == null |
&& !Elements.isNonFactoryConstructor(member) |
&& !member.getModifiers().isAbstract() |
&& !((ClassElement) member.getEnclosingElement()).isInterface()) { |
@@ -603,7 +605,8 @@ public class Resolver { |
} |
resolve(functionNode.getBody()); |
- if (Elements.isNonFactoryConstructor(member)) { |
+ if (Elements.isNonFactoryConstructor(member) |
+ && !(body instanceof DartNativeBlock)) { |
resolveInitializers(node, initializedFields); |
// Test for missing final initialized fields |
if (!this.currentHolder.isInterface() && !member.getModifiers().isRedirectedConstructor()) { |