# New Ticket Created by Zoffix Znet # Please include the string: [perl #131413] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=131413 >
The first one says it expected Int but got Str, when in reality the type constraint is Any-to-Int:D coercer. The second one talks about Int methods, but I ain't calling any. IMO the coercer should catch such errors when calling the method and report them as type check failure instead. 18:34 Zoffix m: sub (Int:D()) {}( Str ) 18:34 camelia rakudo-moar fb7dd8: OUTPUT: «Type check failed in binding to parameter '<anon>'; expected Int but got Str (Str) in sub at <tmp> line 1 in block <unit> at <tmp> line 1» 18:34 Zoffix m: sub (Int()) {}( Str ) 18:34 camelia rakudo-moar fb7dd8: OUTPUT: «Invocant of method 'Int' must be an object instance of type 'Str', not a type object of type 'Str'. Did you forget a '.new'? in sub at <tmp> line 1 in block <unit> at <tmp> line 1»