[vala/wip/effectfree: 4/15] Add get_defined_variables in PostfixExpression



commit 13f61ba1eb2e59a1db0a29f6648c0e73a97dad5e
Author: Luca Bruno <lucabru src gnome org>
Date:   Wed Jun 15 13:30:49 2011 +0200

    Add get_defined_variables in PostfixExpression

 vala/valapostfixexpression.vala |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/vala/valapostfixexpression.vala b/vala/valapostfixexpression.vala
index 37745c3..3fe8900 100644
--- a/vala/valapostfixexpression.vala
+++ b/vala/valapostfixexpression.vala
@@ -64,6 +64,14 @@ public class Vala.PostfixExpression : Expression {
 		return false;
 	}
 
+	public override void get_defined_variables (Collection<LocalVariable> collection) {
+		inner.get_defined_variables (collection);
+		var local = inner.symbol_reference as LocalVariable;
+		if (local != null) {
+			collection.add (local);
+		}
+	}
+
 	public override void get_used_variables (Collection<LocalVariable> collection) {
 		inner.get_used_variables (collection);
 	}



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