[vala/0.42] vala: Implement get_*_variables() for ConditionalExpression



commit f7e02f918096509d5b9e4583d55de9b0c4220546
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Wed Oct 24 14:51:17 2018 +0200

    vala: Implement get_*_variables() for ConditionalExpression

 vala/valaconditionalexpression.vala | 12 ++++++++++++
 1 file changed, 12 insertions(+)
---
diff --git a/vala/valaconditionalexpression.vala b/vala/valaconditionalexpression.vala
index b5241099b..ad4878b0b 100644
--- a/vala/valaconditionalexpression.vala
+++ b/vala/valaconditionalexpression.vala
@@ -116,6 +116,18 @@ public class Vala.ConditionalExpression : Expression {
                }
        }
 
+       public override void get_defined_variables (Collection<Variable> collection) {
+               condition.get_defined_variables (collection);
+               true_expression.get_defined_variables (collection);
+               false_expression.get_defined_variables (collection);
+       }
+
+       public override void get_used_variables (Collection<Variable> collection) {
+               condition.get_used_variables (collection);
+               true_expression.get_used_variables (collection);
+               false_expression.get_used_variables (collection);
+       }
+
        public override bool check (CodeContext context) {
                if (checked) {
                        return !error;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]