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

compiler: fix #3973 by dealing with name mangling problem

This commit is contained in:
hazohelet
2020-03-26 16:54:33 +09:00
committed by GitHub
parent d54843275f
commit d8bcd13e86
5 changed files with 76 additions and 66 deletions

View File

@@ -366,7 +366,7 @@ fn (p mut Parser) name_expr() string {
}
// Unknown name, try prepending the module name to it
// TODO perf
else if !p.table.known_type(name) && !p.table.known_fn(name) && !p.table.known_const(name) && !is_c {
else if !p.table.known_type(name) && !p.known_fn_in_mod(name) && !p.table.known_const(name) && !is_c {
name = p.prepend_mod(name)
}
// re-check