Closed
Description
Field access does.
impl i for int {
fn val() -> str { "wut" }
}
fn main() {
let j = @{
val: 10
};
// This autoderefs
assert j.val == 10;
let i = @10;
// This does not
assert i.val() == "wut";
}
../src/test/run-pass/method-autoderef.rs:12:11: 12:16 error: attempted access of field val on type @int, but no public field or method with that name was found
../src/test/run-pass/method-autoderef.rs:12 assert i.val() == "wut";