diff --git a/vlib/v/checker/checker.v b/vlib/v/checker/checker.v index a4919c7824..25cabe6bfe 100644 --- a/vlib/v/checker/checker.v +++ b/vlib/v/checker/checker.v @@ -1463,7 +1463,8 @@ pub fn (mut c Checker) call_fn(mut call_expr ast.CallExpr) table.Type { } } if !f.is_pub && f.language == .v && f.name.len > 0 && f.mod.len > 0 && f.mod != c.mod { - c.error('function `$f.name` is private. curmod=$c.mod fmod=$f.mod', call_expr.pos) + c.error('function `$f.name` is private, so you can not import it in module `$c.mod`', + call_expr.pos) } if f.is_deprecated { c.warn('function `$f.name` has been deprecated', call_expr.pos) diff --git a/vlib/v/checker/tests/import_symbol_fn_private_err.out b/vlib/v/checker/tests/import_symbol_fn_private_err.out index 1ddc4f460c..c12f27ee2c 100644 --- a/vlib/v/checker/tests/import_symbol_fn_private_err.out +++ b/vlib/v/checker/tests/import_symbol_fn_private_err.out @@ -3,7 +3,7 @@ vlib/v/checker/tests/import_symbol_fn_private_err.vv:1:20: error: module `time` | ~~~~~ 2 | fn main() { 3 | since(now()) -vlib/v/checker/tests/import_symbol_fn_private_err.vv:3:3: error: function `time.since` is private. curmod=main fmod=time +vlib/v/checker/tests/import_symbol_fn_private_err.vv:3:3: error: function `time.since` is private, so you can not import it in module `main` 1 | import time { now, since } 2 | fn main() { 3 | since(now())