| Index: lib/compiler/implementation/resolver.dart
|
| diff --git a/lib/compiler/implementation/resolver.dart b/lib/compiler/implementation/resolver.dart
|
| index 5e949c3c19a02427004619e98c40b1ddcfd18e8d..23c2c837d0d9fce9140565213b98ebda542e73a5 100644
|
| --- a/lib/compiler/implementation/resolver.dart
|
| +++ b/lib/compiler/implementation/resolver.dart
|
| @@ -211,6 +211,17 @@ class ResolverTask extends CompilerTask {
|
| return visitor.mapping;
|
| }
|
|
|
| + Type resolveType(Element element, TypeAnnotation annotation) {
|
| + if (annotation === null) return compiler.types.dynamicType;
|
| + ResolverVisitor visitor = new ResolverVisitor(compiler, element);
|
| + Type result = visitor.resolveTypeAnnotation(annotation);
|
| + if (result === null) {
|
| + // TODO(karklose): warning.
|
| + return compiler.types.dynamicType;
|
| + }
|
| + return result;
|
| + }
|
| +
|
| void resolveClass(ClassElement element) {
|
| if (element.isResolved) return;
|
| measure(() {
|
| @@ -1107,9 +1118,12 @@ class ResolverVisitor extends CommonResolverVisitor<Element> {
|
| }
|
| type = new InterfaceType(cls.name, cls, arguments.toLink());
|
| } else if (element.isTypedef()) {
|
| - // TODO(karlklose): implement typedefs. We return a fake type that the
|
| - // code generator can use to detect typedefs in is-checks.
|
| - type = new InterfaceType(element.name, element);
|
| + // TODO(ngeoffray): This is a hack to help us get support for the
|
| + // DOM library.
|
| + // TODO(ngeoffray): The list of types for the argument is wrong.
|
| + type = new FunctionType(compiler.types.dynamicType,
|
| + const EmptyLink<Type>(),
|
| + element);
|
| } else {
|
| type = element.computeType(compiler);
|
| }
|
|
|