]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Add postconditions when exiting from methods returning void
authorLuca Bruno <lucabru@src.gnome.org>
Tue, 11 Jun 2013 19:39:22 +0000 (21:39 +0200)
committerLuca Bruno <lucabru@src.gnome.org>
Tue, 11 Jun 2013 19:39:22 +0000 (21:39 +0200)
codegen/valaccodebasemodule.vala

index 7b8b6cd08a2772ca96602efa57fedd535d6ed199..d55d3f772e3fcfb5abe9fa1f3f3dbf72704bda9b 100644 (file)
@@ -2161,6 +2161,10 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                                        return_out_parameter (param);
                                }
                        }
+                       // check postconditions
+                       foreach (var postcondition in m.get_postconditions ()) {
+                               create_postcondition_statement (postcondition);
+                       }
                } else if (b.parent_symbol is PropertyAccessor) {
                        var acc = (PropertyAccessor) b.parent_symbol;
                        if (acc.value_parameter != null && !acc.value_parameter.captured && requires_destroy (acc.value_parameter.variable_type)) {