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

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

Issue 11417135: Issue 6822. Report error only if import prefix is hidden by top-level element. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.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 8b6f83ca711ed6fd171e9f2cf8e172e773697b87..ee9743b770af253d397631431892a8a911bd9f8e 100644
--- a/compiler/java/com/google/dart/compiler/resolver/ResolutionContext.java
+++ b/compiler/java/com/google/dart/compiler/resolver/ResolutionContext.java
@@ -81,16 +81,6 @@ public class ResolutionContext implements ResolutionErrorListener {
void declare(Element element, ErrorCode errorCode) {
String name = element.getName();
Element existingLocalElement = scope.findLocalElement(name);
- // Check for duplicate declaration in the enclosing scope.
- if (existingLocalElement == null) {
- Element existingElement = scope.findElement(scope.getLibrary(), name);
- if (existingElement != null) {
- SourceInfo nameSourceInfo = element.getNameLocation();
- if (existingElement.getKind() == ElementKind.LIBRARY_PREFIX) {
- onError(nameSourceInfo, ResolverErrorCode.CANNOT_HIDE_IMPORT_PREFIX, name);
- }
- }
- }
// Check for duplicate declaration in the same scope.
if (existingLocalElement != null && errorCode != null) {
SourceInfo nameSourceInfo = element.getNameLocation();
« no previous file with comments | « no previous file | compiler/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698