[vala/wip/transform: 52/107] Preserve the cast when unboxing gvariant



commit 56bcf9aa9e3330234bf8f0a3620728bde3b52dd9
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 file changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/codegen/valagvarianttransformer.vala b/codegen/valagvarianttransformer.vala
index f1f2cff13..500cff25c 100644
--- a/codegen/valagvarianttransformer.vala
+++ b/codegen/valagvarianttransformer.vala
@@ -502,8 +502,6 @@ public class Vala.GVariantTransformer : CodeTransformer {
                }
 
                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;
@@ -526,12 +524,12 @@ public class Vala.GVariantTransformer : CodeTransformer {
                        }
                }
 
-               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]