1 fn function<T>(x: T, y: bool) -> T {
7 fn method<T>(&self, x: T) -> T {
12 fn wrong_arg_type(x: u32) -> u32 {
17 // Should not trigger.
18 let x = wrong_arg_type(0u16); //~ ERROR mismatched types
19 let x: u16 = function(0, 0u8); //~ ERROR mismatched types
21 // Should trigger exactly once for the first argument.
22 let x: u16 = function(0u32, 0u8); //~ ERROR arguments to this function are incorrect
25 let x: u16 = function(0u32, true); //~ ERROR mismatched types
26 let x: u16 = (S {}).method(0u32); //~ ERROR mismatched types
27 function(0u32, 8u8) //~ ERROR arguments to this function are incorrect