blob: 3ce13edc15e07f7fe5ed0e463a2a17ac091df8c9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// Tests that trans_path checks whether a
// pattern-bound var is an upvar (when translating
// the for-each body)
fn foo(src: uint) {
alt some(src) {
some(src_id) {
uint::range(0u, 10u) {|i|
let yyy = src_id;
assert (yyy == 0u);
}
}
_ { }
}
}
fn main() { foo(0u); }
|