Closed
Description
The error is in kind checking. It looks like the impl cannot use the type parameter T
.
import dvec::dvec;
class c1<T: copy> {
new() {}
fn f1(x: T) {} // OK
}
impl i1<T: copy> for c1<T> {
fn f2(x: T) {} // can't be used
}
fn main() {
c1::<int>().f1(4);
c1::<int>().f2(4); //comment out this line, and the ICE disappears
}
The error is
rust: upcall fail 'Internal error: in kind::check_expr, length mismatch between actual and declared bounds: actual
= int (1 tys), declared = [@[bound_copy], @[bound_copy]] (2 tys)', /home/rustbuild/src/rustbot/workspace-snap-stage
3-x86_64-unknown-linux-gnu/src/src/rustc/middle/kind.rs:269