[vala/wip/transform: 121/179] Preserve the cast when unboxing gvariant



commit 4a854d2f70169ed5e9bfb243a795b306b0834d9f
Author: Luca Bruno <lucabru src gnome org>
Date:   Thu Jan 5 13:47:43 2012 +0100

    Preserve the cast when unboxing gvariant

 codegen/valagvarianttransformer.vala |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/codegen/valagvarianttransformer.vala b/codegen/valagvarianttransformer.vala
index e2de3bd..66ddf4d 100644
--- a/codegen/valagvarianttransformer.vala
+++ b/codegen/valagvarianttransformer.vala
@@ -500,8 +500,6 @@ public class Vala.GVariantTransformer : CCodeTransformer {
                }
 
                push_builder (new CodeBuilder (context, expr.parent_statement, expr.source_reference));
-               var old_parent_node = expr.parent_node;
-               var target_type = expr.target_type.copy ();
                var type = expr.value_type;
 
                BasicTypeInfo basic_type;
@@ -524,12 +522,12 @@ public class Vala.GVariantTransformer : CCodeTransformer {
                        }
                }
 
-               result.target_type = target_type;
-               context.analyzer.replaced_nodes.add (expr);
-               old_parent_node.replace_expression (expr, result);
+               context.analyzer.replaced_nodes.add (expr.inner);
+               expr.inner = result;
                b.check (this);
                pop_builder ();
-               check (result);
+               expr.checked = false;
+               check (expr);
        }
 
        public override void visit_expression (Expression expr) {


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