Chromium Code Reviews| Index: dart/lib/compiler/implementation/resolver.dart |
| =================================================================== |
| --- dart/lib/compiler/implementation/resolver.dart (revision 8049) |
| +++ dart/lib/compiler/implementation/resolver.dart (working copy) |
| @@ -1130,11 +1130,19 @@ |
| type = new InterfaceType(cls, arguments.toLink()); |
| } |
| } else if (element.isTypedef()) { |
| + Typedef node = element.parseNode(compiler); |
|
ahe
2012/05/29 12:32:08
Need to wrap this in compiler.withCurrentElement.
|
| + |
| // 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. |
| + LinkBuilder<Type> arguments = new LinkBuilder<Type>(); |
|
kasperl
2012/05/29 12:16:24
Factor this code out into a helper function with a
ngeoffray
2012/05/29 12:31:01
I moved the code to TypedefElement.computeType.
|
| + for (Link<Node> formals = node.formals.nodes; |
|
ahe
2012/05/29 12:32:08
I'm really concerned about this approach. You need
ngeoffray
2012/05/29 13:06:28
Done.
|
| + !formals.isEmpty(); |
| + formals = formals.tail) { |
| + arguments.addLast(compiler.types.dynamicType); |
|
ahe
2012/05/29 12:32:08
Since you only build a list of dynamicType, you do
|
| + } |
| + |
| type = new FunctionType(compiler.types.dynamicType, |
| - const EmptyLink<Type>(), |
| + arguments.toLink(), |
| element); |
| } else if (element.isTypeVariable()) { |
| type = element.computeType(compiler); |