Skip to content

Commit ff67d0e

Browse files
committed
---
yaml --- r: 1603 b: refs/heads/master c: 336f22d h: refs/heads/master i: 1601: 2e4e239 1599: 5ce6008 v: v3
1 parent 8f649b5 commit ff67d0e

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
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: 0117cf2fc27354e55bcb1c1f0ede97d9ac92f02d
2+
refs/heads/master: 336f22db61c6c582b4ef019fcfa739e813668fe1

trunk/src/comp/middle/trans.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3338,8 +3338,15 @@ fn trans_path(@block_ctxt cx, &ast.path p, &option.t[ast.def] dopt,
33383338
ret lval_mem(cx, cx.fcx.llargs.get(did));
33393339
}
33403340
case (ast.def_local(?did)) {
3341-
check (cx.fcx.lllocals.contains_key(did));
3342-
ret lval_mem(cx, cx.fcx.lllocals.get(did));
3341+
alt (cx.fcx.lllocals.find(did)) {
3342+
case (none[ValueRef]) {
3343+
check (cx.fcx.llupvars.contains_key(did));
3344+
ret lval_mem(cx, cx.fcx.llupvars.get(did));
3345+
}
3346+
case (some[ValueRef](?llval)) {
3347+
ret lval_mem(cx, llval);
3348+
}
3349+
}
33433350
}
33443351
case (ast.def_binding(?did)) {
33453352
check (cx.fcx.lllocals.contains_key(did));

0 commit comments

Comments
 (0)