parent
168daebccf
commit
43942057a4
|
@ -1383,9 +1383,12 @@ pub fn (mut c Checker) call_fn(mut call_expr ast.CallExpr) table.Type {
|
||||||
*/
|
*/
|
||||||
if !c.check_types(typ, arg.typ) {
|
if !c.check_types(typ, arg.typ) {
|
||||||
// str method, allow type with str method if fn arg is string
|
// str method, allow type with str method if fn arg is string
|
||||||
if arg_typ_sym.kind == .string && typ_sym.has_method('str') {
|
// Passing an int or a string array produces a c error here
|
||||||
continue
|
// Deleting this condition results in propper V error messages
|
||||||
}
|
// if arg_typ_sym.kind == .string && typ_sym.has_method('str') {
|
||||||
|
// continue
|
||||||
|
// }
|
||||||
|
|
||||||
if typ_sym.kind == .void && arg_typ_sym.kind == .string {
|
if typ_sym.kind == .void && arg_typ_sym.kind == .string {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue