diff options
| author | Roy Frostig <[email protected]> | 2010-08-27 17:26:37 -0700 |
|---|---|---|
| committer | Roy Frostig <[email protected]> | 2010-08-27 17:30:26 -0700 |
| commit | 9481907211e33360ff493ca60c4b3211caf1b897 (patch) | |
| tree | 10030afc40df33e23cdc9ef1748ec749328ec87d /src/boot/me/resolve.ml | |
| parent | Revert "More work on lexer.rs: start using keyword hashtable, handle more lex... (diff) | |
| download | rust-9481907211e33360ff493ca60c4b3211caf1b897.tar.xz rust-9481907211e33360ff493ca60c4b3211caf1b897.zip | |
Make pattern-alt drop the slots it initializes when binding slot patterns. Undoes most of the hackiness in 5e77e784f006e36c06252d9beccbd7893eddac73 and replaces it with a more proper fix.
Diffstat (limited to 'src/boot/me/resolve.ml')
| -rw-r--r-- | src/boot/me/resolve.ml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/boot/me/resolve.ml b/src/boot/me/resolve.ml index 25eb544a..9e234a8f 100644 --- a/src/boot/me/resolve.ml +++ b/src/boot/me/resolve.ml @@ -122,9 +122,10 @@ let stmt_collecting_visitor htab_put slots key slot_id; htab_put cx.ctxt_slot_keys slot_id key | Ast.PAT_tag (_, pats) -> Array.iter (resolve_pat block) pats - | Ast.PAT_lit _ | Ast.PAT_wild -> () + | Ast.PAT_lit _ + | Ast.PAT_wild -> () in - Array.iter (fun { node = (p, b) } -> resolve_pat b p) arms + Array.iter (fun { node = (p, b) } -> resolve_pat b p) arms | _ -> () end; inner.Walk.visit_stmt_pre stmt |