fix assertione error on block parsing

This commit is contained in:
Aleksey Kladov 2018-08-25 13:21:43 +03:00
parent fed5727ea2
commit 838820ad98
4 changed files with 9 additions and 10 deletions

View file

@ -148,11 +148,7 @@ fn lambda_expr(p: &mut Parser) -> CompletedMarker {
p.eat(MOVE_KW);
params::param_list_opt_types(p);
if opt_fn_ret_type(p) {
if p.at(L_CURLY) {
block(p);
} else {
p.error("expected a block");
}
block(p);
} else {
expr(p);
}