Index: compiler/java/com/google/dart/compiler/UrlSource.java |
diff --git a/compiler/java/com/google/dart/compiler/UrlSource.java b/compiler/java/com/google/dart/compiler/UrlSource.java |
index 67987f4f10cb60b513b745a5d75d855ef5ee0cf6..6411b0512bd4e9e962d7efe5c23f947d6b07986e 100644 |
--- a/compiler/java/com/google/dart/compiler/UrlSource.java |
+++ b/compiler/java/com/google/dart/compiler/UrlSource.java |
@@ -49,6 +49,10 @@ public abstract class UrlSource implements Source { |
protected UrlSource(URI uri, SystemLibraryManager slm) { |
URI expanded = slm != null ? slm.expandRelativeDartUri(uri) : uri; |
+ if (expanded == null) { |
+ // import("dart:typo") case |
+ expanded = uri; |
+ } |
this.uri = BASE_URI.relativize(expanded.normalize()); |
this.absoluteUri = BASE_URI.resolve(expanded); |
this.systemLibraryManager = slm; |