From c99200918e44b23a6c684d6599492dd61bb80a06 Mon Sep 17 00:00:00 2001 From: joe-conigliaro Date: Wed, 8 Jul 2020 01:42:42 +1000 Subject: [PATCH] checker: fix if --- 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 0e1f2fe38d..445bd14ef3 100644 --- a/vlib/v/checker/checker.v +++ b/vlib/v/checker/checker.v @@ -1025,7 +1025,7 @@ pub fn (mut c Checker) call_fn(mut call_expr ast.CallExpr) table.Type { found = true } // try prefix with current module as it would have never gotten prefixed - else if !fn_name.contains('.') && call_expr.mod !in ['builtin'] { + if !found && !fn_name.contains('.') && call_expr.mod !in ['builtin'] { name_prefixed := '${call_expr.mod}.$fn_name' if f1 := c.table.find_fn(name_prefixed) { call_expr.name = name_prefixed