Closed
Description
If I have ownership of a trait object, I would expect to be able to call a by-value self method defined on the trait. For example:
trait A { fn foo(self) {} }
fn foo(a: ~A) {
a.foo();
}
struct B;
impl A for B {}
fn main() {
foo(~B as ~A);
}
currently yields the error of:
foo.rs:4:4: 4:12 error: type `~A:Send` does not implement any method in scope named `foo`
foo.rs:4 a.foo();
^~~~~~~~
error: aborting due to previous error
Nominating for the backcompat-lang 1.0 milestone.