[vala] GAsync: Fix GSourceFunc callbacks in virtual methods



commit f5bd7d9c281891998f284eca8ae47ce8b95384f5
Author: Jürg Billeter <j bitron ch>
Date:   Tue Sep 15 00:45:20 2009 +0200

    GAsync: Fix GSourceFunc callbacks in virtual methods

 vala/valamemberaccess.vala |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/vala/valamemberaccess.vala b/vala/valamemberaccess.vala
index d0692c0..8413f34 100644
--- a/vala/valamemberaccess.vala
+++ b/vala/valamemberaccess.vala
@@ -426,7 +426,12 @@ public class Vala.MemberAccess : Expression {
 			klass = (f.binding == MemberBinding.CLASS);
 		} else if (member is Method) {
 			var m = (Method) member;
-			if (m.base_method != null) {
+			if (m.is_async_callback) {
+				// ensure to use right callback method for virtual/abstract async methods
+				m = analyzer.current_method.get_callback_method ();
+				symbol_reference = m;
+				member = symbol_reference;
+			} else if (m.base_method != null) {
 				// refer to base method to inherit default arguments
 				m = m.base_method;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]