[vala/staging] vala: Include possible "result" to defined variables of Method
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] vala: Include possible "result" to defined variables of Method
- Date: Sat, 6 Apr 2019 20:37:35 +0000 (UTC)
commit 3294e93972d8745d4765fbce917e2a65c530bd3d
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sat Apr 6 21:14:22 2019 +0200
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<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) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]