Closed
Description
This should work:
trait Positioned {
fn SetX(int);
}
trait Movable: Positioned {
fn translate(dx: int) {
self.SetX(self.X() + dx);
}
}
It fails to typecheck:
src/test/run-pass/issue-2616.rs:13:4: 13:13 error: attempted access of field `SetX` on type `self`,
but no field or method with that name was found
/Users/tchevalier/rust2/src/test/run-pass/issue-2616.rs:13 self.SetX(self.X() + dx);