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:
Michael Sullivan 2011-06-24 15:33:10 -07:00
parent f3717da1b1
commit b732ec6f82
1 changed files with 1 additions and 2 deletions

View File

@ -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)) {