[vala/wip/effectfree: 9/38] Set lvalue to inner member access having type non-nullable struct



commit 78e4a255138be1145d301564b8b43f71c19666cc
Author: Luca Bruno <lucabru src gnome org>
Date:   Thu Jun 16 20:22:48 2011 +0200

    Set lvalue to inner member access having type non-nullable struct

 vala/valamemberaccess.vala |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/vala/valamemberaccess.vala b/vala/valamemberaccess.vala
index 5a46de0..95fe326 100644
--- a/vala/valamemberaccess.vala
+++ b/vala/valamemberaccess.vala
@@ -752,6 +752,8 @@ 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 (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;
 			}
 
 			if (context.experimental_non_null && instance && inner.value_type.nullable &&



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