rust/src/test/compile-fail/nested-ty-params.rs
Tim Chevalier f7a1006a07 Make resolve check for type-variable name-shadowing
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.
2011-07-12 13:42:05 -07:00

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);
}