v2: fix error in checker, continue instead of break

pull/3792/head
joe-conigliaro 2020-02-21 00:20:08 +11:00
parent 20d900a21d
commit 72bbec89a9
1 changed files with 1 additions and 1 deletions

View File

@ -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)
} }