Commit 5081623d authored by Jürg Billeter's avatar Jürg Billeter

Visit all expressions in flow analyzer

parent 8a38b3c2
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment