]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Do not generate invalid type check statements in coroutines
authorJürg Billeter <j@bitron.ch>
Fri, 19 Dec 2008 14:51:49 +0000 (14:51 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Fri, 19 Dec 2008 14:51:49 +0000 (14:51 +0000)
2008-12-19  Jürg Billeter  <j@bitron.ch>

* gobject/valaccodemethodmodule.vala:

Do not generate invalid type check statements in coroutines

svn path=/trunk/; revision=2224

ChangeLog
gobject/valaccodemethodmodule.vala

index 483d5070a6761b8ef881993d760646ec24d129b5..7103720dafed9b7c63fde10167274836fa73711d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-12-19  Jürg Billeter  <j@bitron.ch>
+
+       * gobject/valaccodemethodmodule.vala:
+
+       Do not generate invalid type check statements in coroutines
+
 2008-12-19  Jürg Billeter  <j@bitron.ch>
 
        * gobject/valaccodebasemodule.vala:
index 1ee88e000328edecc59b308d4a61fb404cf1eea7..5b5c048e7a514d95e6000d72e38989a59f50bdbe 100644 (file)
@@ -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) {