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

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

Issue 10704114: Issue 3985. Tweaks for warning messages (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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: 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 61a25f393099afdb3e58a6264d79d5c727626504..69bfd943940ca986a234b93dc3e9eadd98f0fe53 100644
--- a/compiler/java/com/google/dart/compiler/resolver/ResolutionContext.java
+++ b/compiler/java/com/google/dart/compiler/resolver/ResolutionContext.java
@@ -91,11 +91,12 @@ public class ResolutionContext implements ResolutionErrorListener {
&& !existingElement.getModifiers().isAbstractField()
&& !Elements.isArtificialAssertMethod(existingElement)) {
SourceInfo nameSourceInfo = element.getNameLocation();
+ String existingTitle = Elements.getUserElementTitle(existingElement);
String existingLocation = Elements.getRelativeElementLocation(element, existingElement);
if (existingElement.getKind() == ElementKind.LIBRARY_PREFIX) {
onError(nameSourceInfo, ResolverErrorCode.CANNOT_HIDE_IMPORT_PREFIX, name);
} else {
- onError(nameSourceInfo, warningCode, name, existingElement, existingLocation);
+ onError(nameSourceInfo, warningCode, name, existingTitle, existingLocation);
}
}
}

Powered by Google App Engine
This is Rietveld 408576698