From: Jürg Billeter Date: Sun, 11 Nov 2012 18:32:10 +0000 (+0100) Subject: codegen: Fix g_simple_async_result_new in interface methods X-Git-Tag: 0.18.1~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e37fca7ca6c58ede0ebe0f675f9e3217cd96f39a;p=thirdparty%2Fvala.git codegen: Fix g_simple_async_result_new in interface methods Fixes bug 684557. --- diff --git a/codegen/valagasyncmodule.vala b/codegen/valagasyncmodule.vala index 9e2a1b4da..b40965ce1 100644 --- a/codegen/valagasyncmodule.vala +++ b/codegen/valagasyncmodule.vala @@ -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"));