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

Unified Diff: runtime/vm/parser.cc

Issue 227703010: Fix instance method resolution with abstract accessors and methods (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 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/abstract_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 34798)
+++ runtime/vm/parser.cc (working copy)
@@ -9114,7 +9114,9 @@
// Check if an instance/static function exists.
func = cls.LookupFunction(ident);
if (!func.IsNull() &&
- (func.IsDynamicFunction() || func.IsStaticFunction())) {
+ (func.IsDynamicFunction() ||
+ func.IsStaticFunction() ||
+ func.is_abstract())) {
if (node != NULL) {
*node = new PrimaryNode(ident_pos,
Function::ZoneHandle(isolate(), func.raw()));
@@ -9126,7 +9128,7 @@
// it is still a field.
func = cls.LookupGetterFunction(ident);
if (!func.IsNull()) {
- if (func.IsDynamicFunction()) {
+ if (func.IsDynamicFunction() || func.is_abstract()) {
if (node != NULL) {
CheckInstanceFieldAccess(ident_pos, ident);
ASSERT(AbstractType::Handle(func.result_type()).IsResolved());
@@ -9156,7 +9158,7 @@
}
func = cls.LookupSetterFunction(ident);
if (!func.IsNull()) {
- if (func.IsDynamicFunction()) {
+ if (func.IsDynamicFunction() || func.is_abstract()) {
if (node != NULL) {
// We create a getter node even though a getter doesn't exist as
// it could be followed by an assignment which will convert it to
« no previous file with comments | « no previous file | tests/language/abstract_method_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698