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

Unified Diff: compiler/java/com/google/dart/compiler/resolver/Resolver.java

Issue 9702034: Removes dartc reliance on its own libraries, now can be targeted at any implementation's libraries (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: junit tests fixed Created 8 years, 9 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: 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()) {

Powered by Google App Engine
This is Rietveld 408576698