]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: Include possible "result" to defined variables of Method
authorRico Tzschichholz <ricotz@ubuntu.com>
Sat, 6 Apr 2019 19:14:22 +0000 (21:14 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sat, 6 Apr 2019 19:14:22 +0000 (21:14 +0200)
vala/valamethod.vala

index 7aef67416f7442c14cf06024543fe1691bfe6ef8..bfaf2a00b0023bcf4b1c064794d38a4a2fa42ed4 100644 (file)
@@ -1203,6 +1203,10 @@ public class Vala.Method : Subroutine, Callable {
        }
 
        public override void get_defined_variables (Collection<Variable> collection) {
+               if (result_var != null) {
+                       collection.add (result_var);
+               }
+
                // capturing variables is only supported if they are initialized
                // therefore assume that captured variables are initialized
                if (closure) {