From: Jürg Billeter Date: Fri, 19 Dec 2008 14:51:49 +0000 (+0000) Subject: Do not generate invalid type check statements in coroutines X-Git-Tag: VALA_0_5_4~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b3b3c9e1cf36027a2c95e633dab4e8706befbd7;p=thirdparty%2Fvala.git Do not generate invalid type check statements in coroutines 2008-12-19 Jürg Billeter * gobject/valaccodemethodmodule.vala: Do not generate invalid type check statements in coroutines svn path=/trunk/; revision=2224 --- diff --git a/ChangeLog b/ChangeLog index 483d5070a..7103720da 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-12-19 Jürg Billeter + + * gobject/valaccodemethodmodule.vala: + + Do not generate invalid type check statements in coroutines + 2008-12-19 Jürg Billeter * gobject/valaccodebasemodule.vala: diff --git a/gobject/valaccodemethodmodule.vala b/gobject/valaccodemethodmodule.vala index 1ee88e000..5b5c048e7 100644 --- a/gobject/valaccodemethodmodule.vala +++ b/gobject/valaccodemethodmodule.vala @@ -753,7 +753,11 @@ public class Vala.CCodeMethodModule : CCodeStructModule { } private CCodeStatement? create_method_type_check_statement (Method m, DataType return_type, TypeSymbol t, bool non_null, string var_name) { - return create_type_check_statement (m, return_type, t, non_null, var_name); + if (m.coroutine) { + return null; + } else { + return create_type_check_statement (m, return_type, t, non_null, var_name); + } } private CCodeStatement? create_precondition_statement (CodeNode method_node, DataType ret_type, Expression precondition) {