Closed
Description
Up-to-date (forward-ported) test case
trait A<T> {
fn g(x: T) -> T { x }
}
impl A<int> for int { }
fn f<T, V: A<T>>(i: V, j: T) -> T {
i.g(j)
}
fn main () {
fail_unless!(f(0, 2) == 2);
}
Original Report
This assumes #4101 is merged. Fails in trans because substs for the parameterized trait A
are not handled correctly.
trait A<T> {
fn g(x: T) -> T { move x }
}
impl int: A<int> { }
fn f<T, V: A<T>>(i: V, j: T) -> T {
i.g(move j)
}
fn main () {
assert f(0, 2) == 2;
}