From 560ba55572e5ffe599266e53a2818b9e64aef925 Mon Sep 17 00:00:00 2001 From: hazohelet Date: Fri, 12 Jul 2019 09:04:20 +0900 Subject: [PATCH] enable consts with operators in scripts --- compiler/main.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/main.v b/compiler/main.v index 214a4fb67b..214f1bcadb 100644 --- a/compiler/main.v +++ b/compiler/main.v @@ -345,7 +345,7 @@ string _STR_TMP(const char *fmt, ...) { // It can be skipped in single file programs if v.pref.is_script { //println('Generating main()...') - cgen.genln('int main() { $cgen.fn_main; return 0; }') + cgen.genln('int main() { init_consts(); $cgen.fn_main; return 0; }') } else { println('panic: function `main` is undeclared in the main module')