mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
v2: fix error in checker, continue instead of break
This commit is contained in:
parent
20d900a21d
commit
72bbec89a9
@ -159,7 +159,7 @@ pub fn (c mut Checker) call_expr(call_expr ast.CallExpr) table.Type {
|
|||||||
if !c.table.check(typ, arg.typ) {
|
if !c.table.check(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') {
|
if arg_typ_sym.kind == .string && typ_sym.has_method('str') {
|
||||||
break
|
continue
|
||||||
}
|
}
|
||||||
c.error('!cannot use type `$typ_sym.name` as type `$arg_typ_sym.name` in argument ${i+1} to `$fn_name`', call_expr.pos)
|
c.error('!cannot use type `$typ_sym.name` as type `$arg_typ_sym.name` in argument ${i+1} to `$fn_name`', call_expr.pos)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user