From 3294e93972d8745d4765fbce917e2a65c530bd3d Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Sat, 6 Apr 2019 21:14:22 +0200 Subject: [PATCH] vala: Include possible "result" to defined variables of Method --- vala/valamethod.vala | 4 ++++ 1 file changed, 4 insertions(+) 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) { -- 2.47.2