]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Visit all expressions in flow analyzer
authorJürg Billeter <j@bitron.ch>
Mon, 22 Mar 2010 18:09:13 +0000 (19:09 +0100)
committerJürg Billeter <j@bitron.ch>
Mon, 22 Mar 2010 18:09:13 +0000 (19:09 +0100)
vala/valaflowanalyzer.vala

index 96bf759502dcfb41bd44d9afabbcd81236581b04..af0e946497a2ba5263a21f51b12465e0f70e971e 100644 (file)
@@ -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) {