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

Unified Diff: runtime/vm/mirrors_api_impl.cc

Issue 23484020: Update handling of ambiguous name references (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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 | « runtime/vm/intrinsifier_x64.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/mirrors_api_impl.cc
===================================================================
--- runtime/vm/mirrors_api_impl.cc (revision 27310)
+++ runtime/vm/mirrors_api_impl.cc (working copy)
@@ -163,27 +163,22 @@
const Library& lib = Library::Cast(obj);
// Case 1. Lookup the unmodified function name.
- String& ambiguity_error_msg = String::Handle(isolate);
- func = lib.LookupFunctionAllowPrivate(func_name, &ambiguity_error_msg);
+ func = lib.LookupFunctionAllowPrivate(func_name);
// Case 2. Lookup the function without the external setter suffix
// '='. Make sure to do this check after the regular lookup, so
// that we don't interfere with operator lookups (like ==).
- if (func.IsNull() && ambiguity_error_msg.IsNull() &&
- HasExternalSetterSuffix(func_name)) {
+ if (func.IsNull() && HasExternalSetterSuffix(func_name)) {
tmp_name = RemoveExternalSetterSuffix(func_name);
tmp_name = Field::SetterName(tmp_name);
- func = lib.LookupFunctionAllowPrivate(tmp_name, &ambiguity_error_msg);
+ func = lib.LookupFunctionAllowPrivate(tmp_name);
}
// Case 3. Lookup the function with the getter prefix prepended.
- if (func.IsNull() && ambiguity_error_msg.IsNull()) {
+ if (func.IsNull()) {
tmp_name = Field::GetterName(func_name);
- func = lib.LookupFunctionAllowPrivate(tmp_name, &ambiguity_error_msg);
+ func = lib.LookupFunctionAllowPrivate(tmp_name);
}
- if (!ambiguity_error_msg.IsNull()) {
- return Api::NewError("%s.", ambiguity_error_msg.ToCString());
- }
} else {
return Api::NewError(
"%s expects argument 'target' to be a class or library.",
« no previous file with comments | « runtime/vm/intrinsifier_x64.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698