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

Unified Diff: sdk/lib/_internal/compiler/implementation/resolution/members.dart

Issue 11361124: Introduce AmbiguousElement (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
Index: sdk/lib/_internal/compiler/implementation/resolution/members.dart
diff --git a/sdk/lib/_internal/compiler/implementation/resolution/members.dart b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
index 1224e338ca355d43266ab8f56e97590d5f556d94..a68a8f4b1fa8a680e04e60ac100fd38a9fee4bce 100644
--- a/sdk/lib/_internal/compiler/implementation/resolution/members.dart
+++ b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
@@ -1083,9 +1083,9 @@ class TypeResolver {
DartType type;
if (element == null) {
onFailure(node, MessageKind.CANNOT_RESOLVE_TYPE, [node.typeName]);
- } else if (element.isErroneous()) {
- ErroneousElement error = element;
- onFailure(node, error.messageKind, error.messageArguments);
+ } else if (element.isAmbiguous()) {
+ AmbiguousElement ambiguous = element;
+ onFailure(node, ambiguous.messageKind, ambiguous.messageArguments);
} else if (!element.impliesType()) {
onFailure(node, MessageKind.NOT_A_TYPE, [node.typeName]);
} else {
@@ -1274,8 +1274,10 @@ class ResolverVisitor extends CommonResolverVisitor<Element> {
MessageKind.CANNOT_RESOLVE,
[node]);
}
- } else if (element.isErroneous()) {
- element = warnOnErroneousElement(node, element);
+ } else if (element.isAmbiguous()) {
+ AmbiguousElement ambiguous = element;
+ element = warnAndCreateErroneousElement(
+ node, node.source, ambiguous.messageKind, ambiguous.messageArguments);
ahe 2012/11/06 16:28:10 Long line.
Johnni Winther 2012/11/07 08:24:43 Done.
} else {
if ((element.kind.category & allowedCategory) == 0) {
// TODO(ahe): Improve error message. Need UX input.

Powered by Google App Engine
This is Rietveld 408576698