Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(330)

Unified Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/LibraryResolver.java

Issue 15741017: Issue 8365. Report error when user library imports an internal SDK library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/LibraryResolver.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/LibraryResolver.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/LibraryResolver.java
index b1c402d1487c2e53a33df03e67a30088d9004469..399e5677a9e0ec8c98b94171123e96faf3dce927 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/LibraryResolver.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/LibraryResolver.java
@@ -451,6 +451,7 @@ public class LibraryResolver {
if (importedLibrary != null) {
// The imported library will be null if the URI in the import directive was invalid.
ImportElementImpl importElement = new ImportElementImpl();
+ importElement.setUri(library.getUri(importDirective));
importElement.setCombinators(buildCombinators(importDirective));
LibraryElement importedLibraryElement = importedLibrary.getLibraryElement();
if (importedLibraryElement != null) {
@@ -571,7 +572,7 @@ public class LibraryResolver {
for (Directive directive : unit.getDirectives()) {
if (directive instanceof ImportDirective) {
ImportDirective importDirective = (ImportDirective) directive;
- Source importedSource = library.getSource(importDirective.getUri());
+ Source importedSource = library.getSource(importDirective);
if (importedSource != null) {
// The imported source will be null if the URI in the import directive was invalid.
if (importedSource.equals(coreLibrarySource)) {
@@ -599,7 +600,7 @@ public class LibraryResolver {
}
} else if (directive instanceof ExportDirective) {
ExportDirective exportDirective = (ExportDirective) directive;
- Source exportedSource = library.getSource(exportDirective.getUri());
+ Source exportedSource = library.getSource(exportDirective);
if (exportedSource != null) {
// The exported source will be null if the URI in the export directive was invalid.
Library exportedLibrary = libraryMap.get(exportedSource);

Powered by Google App Engine
This is Rietveld 408576698