| Index: lib/compiler/implementation/typechecker.dart
|
| diff --git a/lib/compiler/implementation/typechecker.dart b/lib/compiler/implementation/typechecker.dart
|
| index effa903e1d089269798ddf6a7cca36d807db718e..c98e4140d8668e56c1a7feba08ff984c4d5b4dcd 100644
|
| --- a/lib/compiler/implementation/typechecker.dart
|
| +++ b/lib/compiler/implementation/typechecker.dart
|
| @@ -61,19 +61,20 @@ class StatementType implements Type {
|
| }
|
|
|
| class InterfaceType implements Type {
|
| - final SourceString name;
|
| final Element element;
|
| final Link<Type> arguments;
|
|
|
| - const InterfaceType(this.name, this.element,
|
| + const InterfaceType(this.element,
|
| [this.arguments = const EmptyLink<Type>()]);
|
|
|
| + SourceString get name() => element.name;
|
| +
|
| toString() {
|
| StringBuffer sb = new StringBuffer();
|
| sb.add(name.slowToString());
|
| if (!arguments.isEmpty()) {
|
| sb.add('<');
|
| - arguments.printOn(sb);
|
| + arguments.printOn(sb, ', ');
|
| sb.add('>');
|
| }
|
| return sb.toString();
|
| @@ -118,8 +119,8 @@ class Types {
|
|
|
| // TODO(karlklose): should we have a class Void?
|
| Types.with(Element dynamicElement, LibraryElement library)
|
| - : voidType = new InterfaceType(VOID, new ClassElement(VOID, library)),
|
| - dynamicType = new InterfaceType(DYNAMIC, dynamicElement);
|
| + : voidType = new InterfaceType(new ClassElement(VOID, library)),
|
| + dynamicType = new InterfaceType(dynamicElement);
|
|
|
| Type lookup(SourceString s) {
|
| if (VOID == s) {
|
|
|