| 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 part of resolution; | 5 part of resolution; |
| 6 | 6 |
| 7 abstract class TreeElements { | 7 abstract class TreeElements { |
| 8 AnalyzableElement get analyzedElement; | 8 AnalyzableElement get analyzedElement; |
| 9 Iterable<Node> get superUses; | 9 Iterable<Node> get superUses; |
| 10 | 10 |
| (...skipping 2728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2739 | 2739 |
| 2740 if (target != null | 2740 if (target != null |
| 2741 && target == compiler.mirrorSystemGetNameFunction | 2741 && target == compiler.mirrorSystemGetNameFunction |
| 2742 && !compiler.mirrorUsageAnalyzerTask.hasMirrorUsage(enclosingElement)) { | 2742 && !compiler.mirrorUsageAnalyzerTask.hasMirrorUsage(enclosingElement)) { |
| 2743 compiler.reportHint( | 2743 compiler.reportHint( |
| 2744 node.selector, MessageKind.STATIC_FUNCTION_BLOAT, | 2744 node.selector, MessageKind.STATIC_FUNCTION_BLOAT, |
| 2745 {'class': compiler.mirrorSystemClass.name, | 2745 {'class': compiler.mirrorSystemClass.name, |
| 2746 'name': compiler.mirrorSystemGetNameFunction.name}); | 2746 'name': compiler.mirrorSystemGetNameFunction.name}); |
| 2747 } | 2747 } |
| 2748 | 2748 |
| 2749 if (!Elements.isUnresolved(target)) { | 2749 if (target != null) { |
| 2750 if (target.isAbstractField) { | 2750 if (target.isErroneous) { |
| 2751 registry.registerThrowNoSuchMethod(); |
| 2752 } else if (target.isAbstractField) { |
| 2751 AbstractFieldElement field = target; | 2753 AbstractFieldElement field = target; |
| 2752 target = field.getter; | 2754 target = field.getter; |
| 2753 if (target == null && !inInstanceContext) { | 2755 if (target == null && !inInstanceContext) { |
| 2754 registry.registerThrowNoSuchMethod(); | 2756 registry.registerThrowNoSuchMethod(); |
| 2755 target = | 2757 target = |
| 2756 warnAndCreateErroneousElement(node.selector, field.name, | 2758 warnAndCreateErroneousElement(node.selector, field.name, |
| 2757 MessageKind.CANNOT_RESOLVE_GETTER); | 2759 MessageKind.CANNOT_RESOLVE_GETTER); |
| 2758 } | 2760 } |
| 2759 } else if (target.isTypeVariable) { | 2761 } else if (target.isTypeVariable) { |
| 2760 ClassElement cls = target.enclosingClass; | 2762 ClassElement cls = target.enclosingClass; |
| (...skipping 2213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4974 } | 4976 } |
| 4975 | 4977 |
| 4976 /// The result for the resolution of the `assert` method. | 4978 /// The result for the resolution of the `assert` method. |
| 4977 class AssertResult implements ResolutionResult { | 4979 class AssertResult implements ResolutionResult { |
| 4978 const AssertResult(); | 4980 const AssertResult(); |
| 4979 | 4981 |
| 4980 Element get element => null; | 4982 Element get element => null; |
| 4981 | 4983 |
| 4982 String toString() => 'AssertResult()'; | 4984 String toString() => 'AssertResult()'; |
| 4983 } | 4985 } |
| OLD | NEW |