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



commit 10b61ebd684df01f968adc46edfc9b516942e068
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 |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/vala/valamemberaccess.vala b/vala/valamemberaccess.vala
index 51978ed..aaa5a17 100644
--- a/vala/valamemberaccess.vala
+++ b/vala/valamemberaccess.vala
@@ -752,6 +752,9 @@ public class Vala.MemberAccess : Expression {
 				inner.value_type = this_parameter.variable_type.copy ();
 				inner.value_type.value_owned = false;
 				inner.symbol_reference = this_parameter;
+			} else if (context.profile == Profile.GOBJECT && lvalue && member is ArrayLengthField) {
+				inner.lvalue = true;
+				((MemberAccess) inner).check_lvalue_struct_access ();
 			} else {
 				check_lvalue_struct_access ();
 			}



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