| 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 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 } | 440 } |
| 441 } | 441 } |
| 442 | 442 |
| 443 class TypedSelector extends Selector { | 443 class TypedSelector extends Selector { |
| 444 /** | 444 /** |
| 445 * The type of the receiver. Any subtype of that type can be the | 445 * The type of the receiver. Any subtype of that type can be the |
| 446 * target of the invocation. | 446 * target of the invocation. |
| 447 */ | 447 */ |
| 448 final DartType receiverType; | 448 final DartType receiverType; |
| 449 | 449 |
| 450 TypedSelector(this.receiverType, Selector selector) | 450 TypedSelector(DartType this.receiverType, Selector selector) |
| 451 : super(selector.kind, | 451 : super(selector.kind, |
| 452 selector.name, | 452 selector.name, |
| 453 selector.library, | 453 selector.library, |
| 454 selector.argumentCount, | 454 selector.argumentCount, |
| 455 selector.namedArguments); | 455 selector.namedArguments); |
| 456 | 456 |
| 457 /** | 457 /** |
| 458 * Check if [element] will be the one used at runtime when being | 458 * Check if [element] will be the one used at runtime when being |
| 459 * invoked on an instance of [cls]. | 459 * invoked on an instance of [cls]. |
| 460 */ | 460 */ |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 | 496 |
| 497 if (!self.isInterface() && self.isSubclassOf(other)) { | 497 if (!self.isInterface() && self.isSubclassOf(other)) { |
| 498 // Resolve an invocation of [element.name] on [self]. If it | 498 // Resolve an invocation of [element.name] on [self]. If it |
| 499 // is found, this selector is a candidate. | 499 // is found, this selector is a candidate. |
| 500 return hasElementIn(self, element) && appliesUntyped(element, compiler); | 500 return hasElementIn(self, element) && appliesUntyped(element, compiler); |
| 501 } | 501 } |
| 502 | 502 |
| 503 return false; | 503 return false; |
| 504 } | 504 } |
| 505 } | 505 } |
| OLD | NEW |