From a02e1e0af267947cdb5656984a1e284c8603c7ca Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sat, 8 Feb 2020 18:00:13 +0200 Subject: [PATCH] compiler: more actionable error message, when fn main is missing --- vlib/compiler/main.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/compiler/main.v b/vlib/compiler/main.v index 289ee981db..b0598dec4d 100644 --- a/vlib/compiler/main.v +++ b/vlib/compiler/main.v @@ -468,7 +468,7 @@ pub fn (v mut V) generate_main() { v.gen_main_end('return 0') } else if v.v_fmt_file=='' && !v.pref.is_repl { - verror('function `main` is not declared in the main module') + verror('function `main` is not declared in the main module\nPlease add: \nfn main(){\n}\n... to your main program .v file, and try again.') } } else if v.pref.is_test {