two more tests for method autoderef

This commit is contained in:
Niko Matsakis 2012-06-19 20:52:33 -07:00
parent 773a640303
commit de491ea707
2 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,8 @@
impl methods for @@uint {
fn double() -> uint { **self * 2u }
}
fn main() {
let x = @@@@@3u;
assert x.double() == 6u;
}

View File

@ -0,0 +1,8 @@
impl methods for uint {
fn double() -> uint { self * 2u }
}
fn main() {
let x = @@3u;
assert x.double() == 6u;
}