From 72bbec89a9b623a368d2a1d7829acbe4abbc2679 Mon Sep 17 00:00:00 2001 From: joe-conigliaro Date: Fri, 21 Feb 2020 00:20:08 +1100 Subject: [PATCH] v2: fix error in checker, continue instead of break --- vlib/v/checker/checker.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/v/checker/checker.v b/vlib/v/checker/checker.v index 26b5118de0..792d88711f 100644 --- a/vlib/v/checker/checker.v +++ b/vlib/v/checker/checker.v @@ -159,7 +159,7 @@ pub fn (c mut Checker) call_expr(call_expr ast.CallExpr) table.Type { if !c.table.check(typ, arg.typ) { // str method, allow type with str method if fn arg is string 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) }