f7a1006a07
Capturing a type argument in the enclosing scope should be an error -- this commit implements that check in resolve, avoiding a potential assertion failure in trans. Closes #648.
9 lines
166 B
Rust
9 lines
166 B
Rust
// xfail-stage0
|
|
// error-pattern:Attempt to use a type argument out of scope
|
|
fn hd[U](&vec[U] v) -> U {
|
|
fn hd1(&vec[U] w) -> U {
|
|
ret w.(0);
|
|
}
|
|
ret hd1(v);
|
|
}
|