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



commit c20d08a6fecbb54482a9e9138f50fe8ea79e7e98
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 d64cde75e..80a1619bd 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]