[vala] codegen: Fix assignment to struct properties without accessors



commit 83e645aafe81a3c9d68ae4026dc6365b654dd79f
Author: Jürg Billeter <j bitron ch>
Date:   Sat Oct 16 09:27:21 2010 +0200

    codegen: Fix assignment to struct properties without accessors
    
    Fixes bug 632137.

 codegen/valaccodeassignmentmodule.vala |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/codegen/valaccodeassignmentmodule.vala b/codegen/valaccodeassignmentmodule.vala
index 2c1284c..8745541 100644
--- a/codegen/valaccodeassignmentmodule.vala
+++ b/codegen/valaccodeassignmentmodule.vala
@@ -47,10 +47,8 @@ public class Vala.CCodeAssignmentModule : CCodeMemberAccessModule {
 
 		CCodeExpression cexpr = get_cvalue (assignment.right);
 
-		if (!prop.no_accessor_method) {
-			if (prop.property_type.is_real_non_null_struct_type ()) {
-				cexpr = get_address_of_expression (assignment.right, cexpr);
-			}
+		if (prop.property_type.is_real_non_null_struct_type ()) {
+			cexpr = get_address_of_expression (assignment.right, cexpr);
 		}
 
 		if (assignment.operator != AssignmentOperator.SIMPLE) {



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