Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/universe/partial_type_tree.dart |
| diff --git a/sdk/lib/_internal/compiler/implementation/universe/partial_type_tree.dart b/sdk/lib/_internal/compiler/implementation/universe/partial_type_tree.dart |
| index a3d74bb2bd75a9dabe73f119506eda0fccb7eb9d..3cb1e34e41be0b4fa00fb2d1502af5e41c7282b0 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/universe/partial_type_tree.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/universe/partial_type_tree.dart |
| @@ -61,10 +61,17 @@ abstract class PartialTypeTree { |
| } |
| // TODO(kasperl): Move this to the Selector class? |
| + /** |
| + * Returns the [ClassElement] for the most specific supertype of the receiver |
|
ahe
2012/12/03 12:32:01
I don't understand this comment. As far as I can
Johnni Winther
2012/12/04 10:07:17
Done.
|
| + * type on [selector]. |
| + */ |
| ClassElement selectorType(Selector selector) { |
| // TODO(ngeoffray): Should the tree be specialized with DartType? |
| DartType type = selector.receiverType; |
| if (type == null) return compiler.objectClass; |
|
ahe
2012/12/03 12:32:01
What if type is dynamic?
Johnni Winther
2012/12/04 10:07:17
Added a TODO.
|
| + if (identical(type.kind, TypeKind.MALFORMED_TYPE)) |
| + return compiler.objectClass; |
| + // TODO(johnniwinther): Change to use [DartType.unalias]. |
| if (type.element.isTypedef()) return compiler.functionClass; |
| return type.element; |
| } |