aboutsummaryrefslogtreecommitdiff
path: root/src/boot/me/walk.ml
diff options
context:
space:
mode:
authorRoy Frostig <[email protected]>2010-06-25 00:47:23 -0700
committerRoy Frostig <[email protected]>2010-06-25 00:47:23 -0700
commit241305caab232b04666704dc6853c41312cd283a (patch)
tree9a8cd9ef0573d15477927afb02620c723745ddcf /src/boot/me/walk.ml
parentRearrange pexp-custom stuff a bit. (diff)
downloadrust-241305caab232b04666704dc6853c41312cd283a.tar.xz
rust-241305caab232b04666704dc6853c41312cd283a.zip
Resolve and typecheck patterns in pattern alt redux. This time featuring way more correctness.
Diffstat (limited to 'src/boot/me/walk.ml')
-rw-r--r--src/boot/me/walk.ml14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/boot/me/walk.ml b/src/boot/me/walk.ml
index 30b30e32..57864f99 100644
--- a/src/boot/me/walk.ml
+++ b/src/boot/me/walk.ml
@@ -655,15 +655,17 @@ and walk_pat
let walk p =
match p with
Ast.PAT_lit lit -> walk_lit v lit
- | Ast.PAT_tag (_, pats) -> Array.iter (walk_pat v) pats
+ | Ast.PAT_tag (lv, pats) ->
+ walk_lval v lv;
+ Array.iter (walk_pat v) pats
| Ast.PAT_slot (si, _) -> walk_slot_identified v si
| Ast.PAT_wild -> ()
in
- walk_bracketed
- v.visit_pat_pre
- (fun _ -> walk p)
- v.visit_pat_post
- p
+ walk_bracketed
+ v.visit_pat_pre
+ (fun _ -> walk p)
+ v.visit_pat_post
+ p
and walk_block