2 // Test method calls with self as an argument
4 #![feature(box_syntax)]
6 static mut COUNT: usize = 1;
12 fn foo(self, x: &Foo) {
13 unsafe { COUNT *= 2; }
14 // Test internal call.
26 unsafe { COUNT *= 3; }
30 unsafe { COUNT *= 5; }
33 fn qux(self: Box<Foo>) {
34 unsafe { COUNT *= 7; }
40 // Test external call.
47 unsafe { assert_eq!(COUNT, 2*3*3*3*5*5*5*7*7*7); }