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



commit 6c68de5e98f0231be41a8ba5ae130f8a2f1dc4b7
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 a0f0dbba7..ce1ee10ad 100644
--- a/vala/valaconditionalexpression.vala
+++ b/vala/valaconditionalexpression.vala
@@ -126,6 +126,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]