Index: dart/lib/compiler/implementation/typechecker.dart |
diff --git a/dart/lib/compiler/implementation/typechecker.dart b/dart/lib/compiler/implementation/typechecker.dart |
index fbf0cece90c33e08aaf529e95ae8eaeff874b575..2c259b3ce7f096e28e5549fd5f2fb0e7669813e8 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) { |
Lasse Reichstein Nielsen
2012/08/07 09:02:17
Why is this not a constructor?
I only see one use
|
+ assert(returnType === null); |
+ assert(parameterTypes === null); |
+ returnType = other.returnType; |
+ parameterTypes = other.parameterTypes; |
+ } |
} |
class Types { |