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

Unified Diff: runtime/vm/parser.cc

Issue 11230061: Fix resolution of super getters and setters (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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/co19/co19-dart2dart.status » ('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 13980)
+++ runtime/vm/parser.cc (working copy)
@@ -1542,6 +1542,16 @@
const Function& super_getter = Function::ZoneHandle(
Resolver::ResolveDynamicAnyArgs(super_class, getter_name));
if (super_getter.IsNull()) {
+ const String& setter_name =
+ String::ZoneHandle(Field::SetterName(field_name));
+ const Function& super_setter = Function::ZoneHandle(
+ Resolver::ResolveDynamicAnyArgs(super_class, setter_name));
+ if (!super_setter.IsNull()) {
+ return new StaticGetterNode(
+ field_pos, implicit_argument, true, super_class, field_name);
+ }
+ }
+ if (super_getter.IsNull()) {
// Check if this is an access to an implicit closure using 'super'.
// If a function exists of the specified field_name then try
// accessing it as a getter, at runtime we will handle this by
« no previous file with comments | « no previous file | tests/co19/co19-dart2dart.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698