diff --git a/schala-lang/language/src/ast/visitor.rs b/schala-lang/language/src/ast/visitor.rs index c633ec7..b5c6744 100644 --- a/schala-lang/language/src/ast/visitor.rs +++ b/schala-lang/language/src/ast/visitor.rs @@ -178,8 +178,12 @@ fn walk_if_expr_body(v: &mut V, body: &IfExpressionBody) { Condition::Expression(ref expr) => { walk_expression(v, expr); } - _ => (), + Condition::Else => (), } + if let Some(ref guard) = arm.guard { + walk_expression(v, &guard); + } + walk_block(v, &arm.body); } } }