OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library universe; | 5 library universe; |
6 | 6 |
7 import '../closure.dart'; | 7 import '../closure.dart'; |
8 import '../elements/elements.dart'; | 8 import '../elements/elements.dart'; |
9 import '../dart2jslib.dart'; | 9 import '../dart2jslib.dart'; |
10 import '../runtime_types.dart'; | 10 import '../runtime_types.dart'; |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 } | 423 } |
424 | 424 |
425 ClassElement self = receiverType.element; | 425 ClassElement self = receiverType.element; |
426 | 426 |
427 if (other.implementsInterface(self) | 427 if (other.implementsInterface(self) |
428 || other.isSubclassOf(self) | 428 || other.isSubclassOf(self) |
429 || compiler.world.hasAnySubclassThatImplements(other, receiverType)) { | 429 || compiler.world.hasAnySubclassThatImplements(other, receiverType)) { |
430 return appliesUntyped(element, compiler); | 430 return appliesUntyped(element, compiler); |
431 } | 431 } |
432 | 432 |
433 if (!self.isInterface() && self.isSubclassOf(other)) { | 433 if (!self.isTypedef() && !self.isInterface() && self.isSubclassOf(other)) { |
434 // Resolve an invocation of [element.name] on [self]. If it | 434 // Resolve an invocation of [element.name] on [self]. If it |
435 // is found, this selector is a candidate. | 435 // is found, this selector is a candidate. |
436 return hasElementIn(self, element) && appliesUntyped(element, compiler); | 436 return hasElementIn(self, element) && appliesUntyped(element, compiler); |
437 } | 437 } |
438 | 438 |
439 return false; | 439 return false; |
440 } | 440 } |
441 } | 441 } |
OLD | NEW |