]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Fix g_simple_async_result_new in interface methods
authorJürg Billeter <j@bitron.ch>
Sun, 11 Nov 2012 18:32:10 +0000 (19:32 +0100)
committerJürg Billeter <j@bitron.ch>
Tue, 13 Nov 2012 20:13:44 +0000 (21:13 +0100)
Fixes bug 684557.

codegen/valagasyncmodule.vala

index 9e2a1b4daacf448fd296b6b55dc95ae1f527b938..b40965ce10a2b1c6824c4a4710efc5cc1aacb6dd 100644 (file)
@@ -202,9 +202,9 @@ public class Vala.GAsyncModule : GSignalModule {
 
                var create_result = new CCodeFunctionCall (new CCodeIdentifier ("g_simple_async_result_new"));
 
-               var cl = m.parent_symbol as Class;
+               var t = m.parent_symbol as TypeSymbol;
                if (!(m is CreationMethod) && m.binding == MemberBinding.INSTANCE &&
-                   cl != null && cl.is_subtype_of (gobject_type)) {
+                   t != null && t.is_subtype_of (gobject_type)) {
                        var gobject_cast = new CCodeFunctionCall (new CCodeIdentifier ("G_OBJECT"));
                        gobject_cast.add_argument (new CCodeIdentifier ("self"));