From: Rico Tzschichholz Date: Sat, 6 Apr 2019 19:14:22 +0000 (+0200) Subject: vala: Include possible "result" to defined variables of Method X-Git-Tag: 0.45.1~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3294e93972d8745d4765fbce917e2a65c530bd3d;p=thirdparty%2Fvala.git vala: Include possible "result" to defined variables of Method --- diff --git a/vala/valamethod.vala b/vala/valamethod.vala index 7aef67416..bfaf2a00b 100644 --- a/vala/valamethod.vala +++ b/vala/valamethod.vala @@ -1203,6 +1203,10 @@ public class Vala.Method : Subroutine, Callable { } public override void get_defined_variables (Collection 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) {