[vala/wip/transform: 138/139] Add more get_error_types



commit 1db957ff9b93ed5575cc9cf7836abc6c4a32a3fa
Author: Luca Bruno <luca bruno immobiliare it>
Date:   Wed Feb 5 10:35:16 2014 +0100

    Add more get_error_types

 codegen/valaccodetransformer.vala   |    1 +
 vala/valacastexpression.vala        |    4 ++++
 vala/valaconditionalexpression.vala |    6 ++++++
 vala/valamemberaccess.vala          |    6 ++++++
 vala/valaunaryexpression.vala       |    4 ++++
 5 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/codegen/valaccodetransformer.vala b/codegen/valaccodetransformer.vala
index aef6926..698723f 100644
--- a/codegen/valaccodetransformer.vala
+++ b/codegen/valaccodetransformer.vala
@@ -342,6 +342,7 @@ public class Vala.CCodeTransformer : CodeTransformer {
                                var replacement = return_temp_access (local, expr.value_type, target_type, 
formal_target_type);
 
                                end_replace_expression (replacement);
+                               return;
                        }
                }
 
diff --git a/vala/valacastexpression.vala b/vala/valacastexpression.vala
index 4fc4d38..785b142 100644
--- a/vala/valacastexpression.vala
+++ b/vala/valacastexpression.vala
@@ -123,6 +123,10 @@ public class Vala.CastExpression : Expression {
                }
        }
 
+       public override void get_error_types (Collection<DataType> collection, SourceReference? 
source_reference = null) {
+               inner.get_error_types (collection, source_reference);
+       }
+
        public override bool check (CodeContext context) {
                if (checked) {
                        return !error;
diff --git a/vala/valaconditionalexpression.vala b/vala/valaconditionalexpression.vala
index f119a0e..b6a23ee 100644
--- a/vala/valaconditionalexpression.vala
+++ b/vala/valaconditionalexpression.vala
@@ -120,6 +120,12 @@ public class Vala.ConditionalExpression : Expression {
                }
        }
 
+       public override void get_error_types (Collection<DataType> collection, SourceReference? 
source_reference = null) {
+               condition.get_error_types (collection, source_reference);
+               true_expression.get_error_types (collection, source_reference);
+               false_expression.get_error_types (collection, source_reference);
+       }
+       
        public override bool check (CodeContext context) {
                if (checked) {
                        return !error;
diff --git a/vala/valamemberaccess.vala b/vala/valamemberaccess.vala
index 982a95f..49feb67 100644
--- a/vala/valamemberaccess.vala
+++ b/vala/valamemberaccess.vala
@@ -193,6 +193,12 @@ public class Vala.MemberAccess : Expression {
                }
        }
 
+       public override void get_error_types (Collection<DataType> collection, SourceReference? 
source_reference = null) {
+               if (inner != null) {
+                       inner.get_error_types (collection, source_reference);
+               }
+       }
+       
        public override bool check (CodeContext context) {
                if (checked) {
                        return !error;
diff --git a/vala/valaunaryexpression.vala b/vala/valaunaryexpression.vala
index 4586d41..fc447f1 100644
--- a/vala/valaunaryexpression.vala
+++ b/vala/valaunaryexpression.vala
@@ -150,6 +150,10 @@ public class Vala.UnaryExpression : Expression {
                return null;
        }
 
+       public override void get_error_types (Collection<DataType> collection, SourceReference? 
source_reference = null) {
+               inner.get_error_types (collection, source_reference);
+       }
+       
        public override bool check (CodeContext context) {
                if (checked) {
                        return !error;


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