[vala/wip/effectfree: 2/38] codegen: Use lvalue of the assignment when emitting array add



commit 30c4e95c26660852c0ecf13165b46dfeb19f04a1
Author: Luca Bruno <lucabru src gnome org>
Date:   Wed Jun 15 12:28:29 2011 +0200

    codegen: Use lvalue of the assignment when emitting array add

 codegen/valaccodearraymodule.vala |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/codegen/valaccodearraymodule.vala b/codegen/valaccodearraymodule.vala
index 18e38df..869741e 100644
--- a/codegen/valaccodearraymodule.vala
+++ b/codegen/valaccodearraymodule.vala
@@ -686,11 +686,11 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule {
 
 		var binary = (BinaryExpression) assignment.right;
 
-		var array = binary.left;
+		var array = assignment.left;
 		var array_type = (ArrayType) array.value_type;
 		var element = binary.right;
 
-		var array_var = assignment.left.symbol_reference;
+		var array_var = array.symbol_reference;
 		if (array_type.rank == 1 && array_var != null && array_var.is_internal_symbol ()
 		    && (array_var is LocalVariable || array_var is Field)) {
 			// valid array add



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