From 4932a32d91b9cc488d53892bde2d0f92855652e0 Mon Sep 17 00:00:00 2001 From: joe-conigliaro Date: Thu, 17 Oct 2019 19:52:46 +1100 Subject: [PATCH] compiler: fix os import by default in v scripts --- vlib/compiler/main.v | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vlib/compiler/main.v b/vlib/compiler/main.v index 7ddfb22d2d..36bfd93fd4 100644 --- a/vlib/compiler/main.v +++ b/vlib/compiler/main.v @@ -560,7 +560,8 @@ pub fn (v mut V) add_v_files_to_compile() { v.log('imports0:') println(v.table.imports) println(v.files) - p.import_table.register_alias('os', 'os', 0) + p.import_table.register_import('os', 0) + v.table.file_imports[p.file_path_id] = p.import_table p.table.imports << 'os' p.table.register_module('os') println('got v script')