builder: fix the uhm `fine` module lookup bug (part 1)
parent
bbc47562b3
commit
6749979534
|
@ -197,10 +197,11 @@ pub fn (mut b Builder) parse_imports() {
|
||||||
if name == '' {
|
if name == '' {
|
||||||
name = file.mod.short_name
|
name = file.mod.short_name
|
||||||
}
|
}
|
||||||
if name != mod {
|
sname := name.all_after_last('.')
|
||||||
// v.parsers[pidx].error_with_token_index('bad module definition: ${v.parsers[pidx].file_path} imports module "$mod" but $file is defined as module `$p_mod`', 1
|
smod := mod.all_after_last('.')
|
||||||
b.parsed_files[i].errors << b.error_with_pos('bad module definition: $ast_file.path imports module "$mod" but $file.path is defined as module `$name`',
|
if sname != smod {
|
||||||
ast_file.path, imp.pos)
|
msg := 'bad module definition: $ast_file.path imports module "$mod" but $file.path is defined as module `$name`'
|
||||||
|
b.parsed_files[i].errors << b.error_with_pos(msg, ast_file.path, imp.pos)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
b.parsed_files << parsed_files
|
b.parsed_files << parsed_files
|
||||||
|
|
Loading…
Reference in New Issue