Index: dart/lib/compiler/implementation/typechecker.dart |
diff --git a/dart/lib/compiler/implementation/typechecker.dart b/dart/lib/compiler/implementation/typechecker.dart |
index 9344d233a888ae4952a10597793b9728a97218d7..28eb3d1aa619cfaa40552710932c7c6418596def 100644 |
--- a/dart/lib/compiler/implementation/typechecker.dart |
+++ b/dart/lib/compiler/implementation/typechecker.dart |
@@ -93,11 +93,11 @@ class InterfaceType implements Type { |
class FunctionType implements Type { |
final Element element; |
- final Type returnType; |
- final Link<Type> parameterTypes; |
+ Type returnType; |
+ Link<Type> parameterTypes; |
- const FunctionType(Type this.returnType, Link<Type> this.parameterTypes, |
- Element this.element); |
+ FunctionType(Type this.returnType, Link<Type> this.parameterTypes, |
+ Element this.element); |
toString() { |
StringBuffer sb = new StringBuffer(); |
@@ -115,6 +115,13 @@ class FunctionType implements Type { |
parameterTypes.forEach((_) { arity++; }); |
return arity; |
} |
+ |
+ void initializeFrom(FunctionType other) { |
+ assert(returnType === null); |
+ assert(parameterTypes === null); |
+ returnType = other.returnType; |
+ parameterTypes = other.parameterTypes; |
+ } |
} |
class Types { |