Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/universe/universe.dart |
| =================================================================== |
| --- sdk/lib/_internal/compiler/implementation/universe/universe.dart (revision 14518) |
| +++ sdk/lib/_internal/compiler/implementation/universe/universe.dart (working copy) |
| @@ -422,7 +422,12 @@ |
| return appliesUntyped(element, compiler); |
| } |
| - ClassElement self = receiverType.element; |
| + Element self = receiverType.element; |
| + if (self.isTypedef()) { |
| + // A typedef is a function type that doesn't have any |
| + // user-defined member. |
|
ahe
2012/11/05 11:23:01
member -> members.
ngeoffray
2012/11/05 11:40:01
Done.
ngeoffray
2012/11/05 11:40:01
Done.
|
| + return false; |
| + } |
| if (other.implementsInterface(self) |
| || other.isSubclassOf(self) |
| @@ -430,7 +435,7 @@ |
| return appliesUntyped(element, compiler); |
| } |
| - if (!self.isTypedef() && !self.isInterface() && self.isSubclassOf(other)) { |
| + if (self.isSubclassOf(other)) { |
|
ahe
2012/11/05 11:23:01
Should this be checking subtype relation instead?
ngeoffray
2012/11/05 11:40:01
No, this is checking if [element] (which is define
|
| // Resolve an invocation of [element.name] on [self]. If it |
| // is found, this selector is a candidate. |
| return hasElementIn(self, element) && appliesUntyped(element, compiler); |