1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

compiler/vlib: add error for no new vars in loop ("_,_") & remove "." from errors

This commit is contained in:
joe-conigliaro
2019-09-26 00:59:50 +10:00
committed by Alexander Medvednikov
parent a124d1f0eb
commit d4bae356ba
10 changed files with 25 additions and 22 deletions

View File

@ -593,7 +593,7 @@ fn (v mut V) add_v_files_to_compile() {
import_path := '$ModPath/vlib/$mod_path'
vfiles := v.v_files_from_dir(import_path)
if vfiles.len == 0 {
verror('cannot import module $mod (no .v files in "$import_path").')
verror('cannot import module $mod (no .v files in "$import_path")')
}
// Add all imports referenced by these libs
for file in vfiles {
@ -613,7 +613,7 @@ fn (v mut V) add_v_files_to_compile() {
import_path := v.find_module_path(mod)
vfiles := v.v_files_from_dir(import_path)
if vfiles.len == 0 {
verror('cannot import module $mod (no .v files in "$import_path").')
verror('cannot import module $mod (no .v files in "$import_path")')
}
// Add all imports referenced by these libs
for file in vfiles {
@ -632,7 +632,7 @@ fn (v mut V) add_v_files_to_compile() {
deps_resolved := dep_graph.resolve()
if !deps_resolved.acyclic {
deps_resolved.display()
verror('Import cycle detected.')
verror('Import cycle detected')
}
// add imports in correct order
for mod in deps_resolved.imports() {