[vala] Visit all expressions in flow analyzer



commit 5081623d55b1201b43446873009b977977b85be2
Author: Jürg Billeter <j bitron ch>
Date:   Mon Mar 22 19:09:13 2010 +0100

    Visit all expressions in flow analyzer

 vala/valaflowanalyzer.vala |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/vala/valaflowanalyzer.vala b/vala/valaflowanalyzer.vala
index 96bf759..af0e946 100644
--- a/vala/valaflowanalyzer.vala
+++ b/vala/valaflowanalyzer.vala
@@ -154,10 +154,6 @@ public class Vala.FlowAnalyzer : CodeVisitor {
 		jump_stack = old_jump_stack;
 	}
 
-	public override void visit_method_call (MethodCall mc) {
-		mc.accept_children (this);
-	}
-
 	public override void visit_method (Method m) {
 		if (m.is_internal_symbol () && !m.used && !m.entry_point
 		    && !m.overrides && (m.base_interface_method == null || m.base_interface_method == m)
@@ -1018,6 +1014,13 @@ public class Vala.FlowAnalyzer : CodeVisitor {
 		stmt.body.accept (this);
 	}
 
+	public override void visit_expression (Expression expr) {
+		// lambda expression is handled separately
+		if (!(expr is LambdaExpression)) {
+			expr.accept_children (this);
+		}
+	}
+
 	private bool unreachable (CodeNode node) {
 		if (current_block == null) {
 			if (!unreachable_reported) {



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