From 3850227b46ac497014f07b7dbc00ce778cee9126 Mon Sep 17 00:00:00 2001 From: Joe Conigliaro Date: Sat, 27 Jul 2019 07:36:22 +1000 Subject: [PATCH] use mod var --- compiler/main.v | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/main.v b/compiler/main.v index fe7b88c780..58c385f16e 100644 --- a/compiler/main.v +++ b/compiler/main.v @@ -920,7 +920,7 @@ fn (v mut V) add_user_v_files() { if v.pref.build_mode == .default_mode { for i := 0; i < v.table.imports.len; i++ { mod := v.table.imports[i] - mod_path := v.module_path(v.table.imports[i]) + mod_path := v.module_path(mod) vfiles := v.v_files_from_dir('$ModPath/vlib/$mod_path') if vfiles.len == 0 { panic('cannot import module $mod, it does not exist.') @@ -938,7 +938,7 @@ fn (v mut V) add_user_v_files() { // for mod in v.table.imports { for i := 0; i < v.table.imports.len; i++ { mod := v.table.imports[i] - mod_path := v.module_path(v.table.imports[i]) + mod_path := v.module_path(mod) idir := os.getwd() mut import_path := '$idir/$mod_path' if !os.file_exists(import_path) {