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

Unified Diff: runtime/vm/object.cc

Issue 1824213002: Fix name resolution through re-exported libraries (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fixing a comment Created 4 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 9faf98743e6d331cc60075ad09d2b0b306c006fc..6591ecbbca4a0847001316b906b8bd2ddb1b112b 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -10803,6 +10803,15 @@ RawObject* Namespace::Lookup(const String& name) const {
if (obj.IsNull() || obj.IsLibraryPrefix()) {
// Lookup in the re-exported symbols.
obj = lib.LookupReExport(name);
+ if (obj.IsNull() && !Field::IsSetterName(name)) {
+ // LookupReExport() only returns objects that match the given name.
+ // If there is no field/func/getter, try finding a setter.
+ const String& setter_name =
+ String::Handle(Field::LookupSetterSymbol(name));
+ if (!setter_name.IsNull()) {
+ obj = lib.LookupReExport(setter_name);
+ }
+ }
}
if (obj.IsNull() || HidesName(name) || obj.IsLibraryPrefix()) {
return Object::null();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698