| Index: dart/lib/compiler/implementation/typechecker.dart
|
| diff --git a/dart/lib/compiler/implementation/typechecker.dart b/dart/lib/compiler/implementation/typechecker.dart
|
| index 33b1dced3c9a08f531db2633816d70e59d34e2aa..909641c5830f98a789f8afe5efd9b2ecc32e6ea9 100644
|
| --- a/dart/lib/compiler/implementation/typechecker.dart
|
| +++ b/dart/lib/compiler/implementation/typechecker.dart
|
| @@ -51,6 +51,8 @@ abstract class DartType {
|
| abstract DartType unalias(Compiler compiler);
|
|
|
| abstract bool operator ==(other);
|
| +
|
| + DartType asRaw() => this;
|
| }
|
|
|
| class TypeVariableType implements DartType {
|
| @@ -156,6 +158,11 @@ class InterfaceType implements DartType {
|
| if (!identical(element, other.element)) return false;
|
| return arguments == other.arguments;
|
| }
|
| +
|
| + InterfaceType asRaw() {
|
| + if (arguments.isEmpty()) return this;
|
| + return new InterfaceType(element);
|
| + }
|
| }
|
|
|
| class FunctionType implements DartType {
|
| @@ -753,7 +760,7 @@ class TypeCheckerVisitor implements Visitor<DartType> {
|
| if (node.isRedirectingFactoryBody) {
|
| // TODO(lrn): Typecheck the body. It must refer to the constructor
|
| // of a subtype.
|
| - return elements.getType(node);
|
| + return StatementType.RETURNING;
|
| }
|
|
|
| final expression = node.expression;
|
|
|