1 // Test method calls with self as an argument cannot subvert type checking.
11 Foo::bar(x); //~ ERROR mismatched types
12 //~| expected `&Foo`, found struct `Foo`
13 Foo::bar(&42); //~ ERROR mismatched types
14 //~| expected struct `Foo`, found integer
15 //~| expected reference `&Foo`
16 //~| found reference `&{integer}`