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

Unified Diff: runtime/vm/parser.cc

Issue 12308005: Fix static name resolution in mixing code (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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/mixin_extends_method_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
===================================================================
--- runtime/vm/parser.cc (revision 18705)
+++ runtime/vm/parser.cc (working copy)
@@ -8255,7 +8255,14 @@
}
// Try to find the identifier in the class scope of the current class.
- Class& cls = Class::Handle(isolate, current_class().raw());
+ // If the current class is the result of a mixin application, we must
+ // use the class scope of the class from which the function originates.
+ Class& cls = Class::Handle(isolate);
+ if (current_class().mixin() == Type::null()) {
+ cls = current_class().raw();
+ } else {
+ cls = parsed_function()->function().origin();
+ }
Function& func = Function::Handle(isolate, Function::null());
Field& field = Field::Handle(isolate, Field::null());
« no previous file with comments | « no previous file | tests/language/mixin_extends_method_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698