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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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