Skip to content

Commit 4fcf3dc

Browse files
committed
---
yaml --- r: 2467 b: refs/heads/master c: 7d086df h: refs/heads/master i: 2465: 3bdccdb 2463: 03dc3a5 v: v3
1 parent 6602cff commit 4fcf3dc

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 9cb20153a8e8cdcbf0e88f5575c9b1f7b37175da
2+
refs/heads/master: 7d086df0954263c2667fb4af65ab82b7e39d51ca

trunk/src/comp/middle/capture.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,15 @@ fn walk_expr(@env e, &@ast.expr x) {
7979
}
8080

8181
fn walk_block(@env e, &ast.block b) {
82-
for each (@tup(ast.ident, ast.block_index_entry) it in
83-
b.node.index.items()) {
84-
alt (it._1) {
85-
case (ast.bie_local(?local)) {
86-
e.idmap.insert(local.id, current_context(*e));
82+
for (@ast.stmt st in b.node.stmts) {
83+
alt (st.node) {
84+
case (ast.stmt_decl(?d,_)) {
85+
alt (d.node) {
86+
case (ast.decl_local(?loc)) {
87+
e.idmap.insert(loc.id, current_context(*e));
88+
}
89+
case (_) { }
90+
}
8791
}
8892
case (_) { }
8993
}

0 commit comments

Comments
 (0)