[vala/wip/effectfree: 12/43] Set lvalue to inner expression when accessing array length field



commit 382b2a9a4ecb8cbe834755ca658b28495a2633dc
Author: Luca Bruno <lucabru src gnome org>
Date:   Fri Jul 1 13:13:56 2011 +0200

    Set lvalue to inner expression when accessing array length field

 vala/valamemberaccess.vala |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/vala/valamemberaccess.vala b/vala/valamemberaccess.vala
index 95fe326..d8141fb 100644
--- a/vala/valamemberaccess.vala
+++ b/vala/valamemberaccess.vala
@@ -754,6 +754,8 @@ public class Vala.MemberAccess : Expression {
 				inner.symbol_reference = this_parameter;
 			} else if (instance && inner.value_type is StructValueType && !inner.value_type.nullable && (symbol_reference is Method || lvalue) && ((inner is MemberAccess && inner.symbol_reference is Variable) || inner is ElementAccess) && inner.symbol_reference != this_parameter) {
 				inner.lvalue = true;
+			} else if (context.profile == Profile.GOBJECT && lvalue && member is ArrayLengthField) {
+				inner.lvalue = true;
 			}
 
 			if (context.experimental_non_null && instance && inner.value_type.nullable &&



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