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

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

Issue 8786002: Check that interface constructors and default class constructors are compatible. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Check that types of constructors parameters are identical Created 9 years 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/SyntheticDefaultConstructorElement.java
diff --git a/compiler/java/com/google/dart/compiler/resolver/SyntheticDefaultConstructorElement.java b/compiler/java/com/google/dart/compiler/resolver/SyntheticDefaultConstructorElement.java
index ee0d77581c045eeca3a0027da754490091d324cb..16ba358acfdae69015a9ebb158da2869f0db8858 100644
--- a/compiler/java/com/google/dart/compiler/resolver/SyntheticDefaultConstructorElement.java
+++ b/compiler/java/com/google/dart/compiler/resolver/SyntheticDefaultConstructorElement.java
@@ -7,7 +7,6 @@ import com.google.dart.compiler.ast.DartLabel;
import com.google.dart.compiler.ast.DartMethodDefinition;
import com.google.dart.compiler.ast.DartNode;
import com.google.dart.compiler.ast.Modifiers;
-import com.google.dart.compiler.type.DynamicType;
import com.google.dart.compiler.type.FunctionType;
import com.google.dart.compiler.type.Type;
import com.google.dart.compiler.type.TypeVariable;
@@ -23,6 +22,7 @@ public class SyntheticDefaultConstructorElement implements ConstructorElement {
private final DartMethodDefinition method;
private final ClassElement enclosingClass;
private final FunctionType functionType;
+ private ConstructorElement defaultConstructor;
public SyntheticDefaultConstructorElement(DartMethodDefinition method,
ClassElement enclosingClass,
@@ -93,6 +93,16 @@ public class SyntheticDefaultConstructorElement implements ConstructorElement {
}
@Override
+ public ConstructorElement getDefaultConstructor() {
+ return defaultConstructor;
+ }
+
+ @Override
+ public void setDefaultConstructor(ConstructorElement defaultConstructor) {
+ this.defaultConstructor = defaultConstructor;
+ }
+
+ @Override
public Type getReturnType() {
return functionType.getReturnType();
}

Powered by Google App Engine
This is Rietveld 408576698