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

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

Issue 9168020: Issue 985: Default class without constructor does not cause a compile-time error (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Nits Created 8 years, 11 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 7d4c0ffc721dfd54d0322eda282f699d42cfd8d7..04b4ec872b08ca97c9830dbb99e087477b5bea21 100644
--- a/compiler/java/com/google/dart/compiler/resolver/Resolver.java
+++ b/compiler/java/com/google/dart/compiler/resolver/Resolver.java
@@ -1331,7 +1331,8 @@ public class Resolver {
}
}
// If constructor not found, try implicit default constructor of the default class.
- if (constructor.getParameters().isEmpty()
+ if (Elements.isDefaultConstructor(constructor)
+ && (Elements.isSyntheticConstructor(constructor) || factoryImplementsInterface)
&& Elements.needsImplicitDefaultConstructor(defaultClass)) {
return new SyntheticDefaultConstructorElement(null, defaultClass, typeProvider);
}

Powered by Google App Engine
This is Rietveld 408576698