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.
This commit is contained in:
parent
f3717da1b1
commit
b732ec6f82
@ -340,8 +340,7 @@ fn walk_expr(&ast_visitor v, @ast::expr e) {
|
||||
}
|
||||
}
|
||||
case (ast::expr_fn(?f)) {
|
||||
walk_fn_decl(v, f.decl);
|
||||
walk_block(v, f.body);
|
||||
walk_fn(v, f, e.span, none, e.id);
|
||||
}
|
||||
case (ast::expr_block(?b)) { walk_block(v, b); }
|
||||
case (ast::expr_assign(?a, ?b)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user