| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 elements.modelx; | 5 library elements.modelx; |
| 6 | 6 |
| 7 import 'elements.dart'; | 7 import 'elements.dart'; |
| 8 import '../constants/expressions.dart'; | 8 import '../constants/expressions.dart'; |
| 9 import '../constants/constructors.dart'; | 9 import '../constants/constructors.dart'; |
| 10 import '../helpers/helpers.dart'; // Included for debug helpers. | 10 import '../helpers/helpers.dart'; // Included for debug helpers. |
| (...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 818 listener.spanFromSpannable(import), | 818 listener.spanFromSpannable(import), |
| 819 MessageKind.IMPORTED_HERE, | 819 MessageKind.IMPORTED_HERE, |
| 820 {'name': name}), | 820 {'name': name}), |
| 821 enclosingElement, hidingElement); | 821 enclosingElement, hidingElement); |
| 822 importScope[name] = element; | 822 importScope[name] = element; |
| 823 importers.registerImport(element, import); | 823 importers.registerImport(element, import); |
| 824 } | 824 } |
| 825 | 825 |
| 826 if (existing != element) { | 826 if (existing != element) { |
| 827 Import existingImport = importers.getImport(existing); | 827 Import existingImport = importers.getImport(existing); |
| 828 Element newElement; | |
| 829 if (existing.library.isPlatformLibrary && | 828 if (existing.library.isPlatformLibrary && |
| 830 !element.library.isPlatformLibrary) { | 829 !element.library.isPlatformLibrary) { |
| 831 // [existing] is implicitly hidden. | 830 // [existing] is implicitly hidden. |
| 832 registerWarnOnUseElement( | 831 registerWarnOnUseElement( |
| 833 import, MessageKind.HIDDEN_IMPORT, element, existing); | 832 import, MessageKind.HIDDEN_IMPORT, element, existing); |
| 834 } else if (!existing.library.isPlatformLibrary && | 833 } else if (!existing.library.isPlatformLibrary && |
| 835 element.library.isPlatformLibrary) { | 834 element.library.isPlatformLibrary) { |
| 836 // [element] is implicitly hidden. | 835 // [element] is implicitly hidden. |
| 837 if (import == null) { | 836 if (import == null) { |
| 838 // [element] is imported implicitly (probably through dart:core). | 837 // [element] is imported implicitly (probably through dart:core). |
| (...skipping 2378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3217 AstElement get definingElement; | 3216 AstElement get definingElement; |
| 3218 | 3217 |
| 3219 bool get hasResolvedAst => definingElement.hasTreeElements; | 3218 bool get hasResolvedAst => definingElement.hasTreeElements; |
| 3220 | 3219 |
| 3221 ResolvedAst get resolvedAst { | 3220 ResolvedAst get resolvedAst { |
| 3222 return new ResolvedAst(declaration, | 3221 return new ResolvedAst(declaration, |
| 3223 definingElement.node, definingElement.treeElements); | 3222 definingElement.node, definingElement.treeElements); |
| 3224 } | 3223 } |
| 3225 | 3224 |
| 3226 } | 3225 } |
| OLD | NEW |