use mod var

pull/1326/head
Joe Conigliaro 2019-07-27 07:36:22 +10:00 committed by Alexander Medvednikov
parent 7b95f09f86
commit 3850227b46
1 changed files with 2 additions and 2 deletions

View File

@ -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) {