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 //~| expected reference `&Foo`
14 //~| found struct `Foo`
15 Foo::bar(&42); //~ ERROR mismatched types
16 //~| expected struct `Foo`, found integer
17 //~| expected reference `&Foo`
18 //~| found reference `&{integer}`