Skip to content

Commit b732ec6

Browse files
committed
Have walk call visit_fn_pre and visit_fn_post on fn expressions.
As a side effect, this fixes a bug where typestate would not properly be checked inside of fn expressions.
1 parent f3717da commit b732ec6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/comp/middle/walk.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,7 @@ fn walk_expr(&ast_visitor v, @ast::expr e) {
340340
}
341341
}
342342
case (ast::expr_fn(?f)) {
343-
walk_fn_decl(v, f.decl);
344-
walk_block(v, f.body);
343+
walk_fn(v, f, e.span, none, e.id);
345344
}
346345
case (ast::expr_block(?b)) { walk_block(v, b); }
347346
case (ast::expr_assign(?a, ?b)) {

0 commit comments

Comments
 (0)