| 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('../leg.dart'); | 9 #import('../leg.dart'); |
| 10 #import('../scanner/scannerlib.dart'); | 10 #import('../scanner/scannerlib.dart'); |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 } | 469 } |
| 470 } | 470 } |
| 471 | 471 |
| 472 class TypedSelector extends Selector { | 472 class TypedSelector extends Selector { |
| 473 /** | 473 /** |
| 474 * The type of the receiver. Any subtype of that type can be the | 474 * The type of the receiver. Any subtype of that type can be the |
| 475 * target of the invocation. | 475 * target of the invocation. |
| 476 */ | 476 */ |
| 477 final DartType receiverType; | 477 final DartType receiverType; |
| 478 | 478 |
| 479 TypedSelector(this.receiverType, Selector selector) | 479 TypedSelector(DartType this.receiverType, Selector selector) |
| 480 : super(selector.kind, | 480 : super(selector.kind, |
| 481 selector.name, | 481 selector.name, |
| 482 selector.library, | 482 selector.library, |
| 483 selector.argumentCount, | 483 selector.argumentCount, |
| 484 selector.namedArguments); | 484 selector.namedArguments); |
| 485 | 485 |
| 486 /** | 486 /** |
| 487 * Check if [element] will be the one used at runtime when being | 487 * Check if [element] will be the one used at runtime when being |
| 488 * invoked on an instance of [cls]. | 488 * invoked on an instance of [cls]. |
| 489 */ | 489 */ |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 | 525 |
| 526 if (!self.isInterface() && self.isSubclassOf(other)) { | 526 if (!self.isInterface() && self.isSubclassOf(other)) { |
| 527 // Resolve an invocation of [element.name] on [self]. If it | 527 // Resolve an invocation of [element.name] on [self]. If it |
| 528 // is found, this selector is a candidate. | 528 // is found, this selector is a candidate. |
| 529 return hasElementIn(self, element) && appliesUntyped(element, compiler); | 529 return hasElementIn(self, element) && appliesUntyped(element, compiler); |
| 530 } | 530 } |
| 531 | 531 |
| 532 return false; | 532 return false; |
| 533 } | 533 } |
| 534 } | 534 } |
| OLD | NEW |