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

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

Issue 337663002: Handle ambiguous prefix members. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | tests/language/regress_19413_bar.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 55ed565d4b257db4eab2dabd229476eedf017cc3..b03c3ac7b450287372ba5386f446ca991e05b689 100644
--- a/sdk/lib/_internal/compiler/implementation/resolution/members.dart
+++ b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
@@ -2458,6 +2458,14 @@ class ResolverVisitor extends MappingVisitor<Element> {
return warnAndCreateErroneousElement(
node, name, MessageKind.NO_SUCH_LIBRARY_MEMBER,
{'libraryName': prefix.name, 'memberName': name});
+ } else if (target.isAmbiguous) {
+ registry.registerThrowNoSuchMethod();
+ AmbiguousElement ambiguous = target;
+ target = warnAndCreateErroneousElement(node, name,
+ ambiguous.messageKind,
+ ambiguous.messageArguments);
+ ambiguous.diagnose(enclosingElement, compiler);
+ return target;
} else if (target.kind == ElementKind.CLASS) {
ClassElement classElement = target;
classElement.ensureResolved(compiler);
« no previous file with comments | « no previous file | tests/language/regress_19413_bar.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698