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

Unified Diff: compiler/java/com/google/dart/compiler/resolver/ResolutionContext.java

Issue 10538077: Issue 3340. conflict of a library prefix and a name in the importing library should produce a compi… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/java/com/google/dart/compiler/resolver/ResolutionContext.java
diff --git a/compiler/java/com/google/dart/compiler/resolver/ResolutionContext.java b/compiler/java/com/google/dart/compiler/resolver/ResolutionContext.java
index 9efd3dacc772808896c28a43a95102632fe9459b..b8b50ff85c9b3b38ea86ede210c98e125cc3c5a4 100644
--- a/compiler/java/com/google/dart/compiler/resolver/ResolutionContext.java
+++ b/compiler/java/com/google/dart/compiler/resolver/ResolutionContext.java
@@ -92,10 +92,9 @@ public class ResolutionContext implements ResolutionErrorListener {
&& !Elements.isArtificialAssertMethod(existingElement)) {
SourceInfo nameSourceInfo = element.getNameLocation();
String existingLocation = Elements.getRelativeElementLocation(element, existingElement);
- // TODO(scheglov) remove condition once HTML will be fixed to don't have duplicates.
- // http://code.google.com/p/dart/issues/detail?id=1060
- if (!Elements.isLibrarySource(element.getSourceInfo().getSource(), "html.dart")
- && !Elements.isLibrarySource(element.getSourceInfo().getSource(), "dom.dart")) {
+ if (existingElement.getKind() == ElementKind.LIBRARY_PREFIX) {
+ onError(nameSourceInfo, ResolverErrorCode.CANNOT_HIDE_IMPORT_PREFIX, name);
+ } else {
onError(nameSourceInfo, warningCode, name, existingElement, existingLocation);
}
}
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698