mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
fix early check
This commit is contained in:
parent
b9b61d5fc3
commit
49cd03ad24
2 changed files with 4 additions and 2 deletions
|
@ -90,8 +90,9 @@ fn (mut p Parser) call_expr(language ast.Language, mod string) ast.CallExpr {
|
|||
or_kind = if is_not { .propagate_result } else { .propagate_option }
|
||||
}
|
||||
if fn_name in p.imported_symbols {
|
||||
check := !p.imported_symbols_used[fn_name]
|
||||
fn_name = p.imported_symbols[fn_name]
|
||||
if !p.imported_symbols_used[fn_name] {
|
||||
if check {
|
||||
p.register_used_import_for_symbol_name(fn_name)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -637,8 +637,9 @@ fn (mut p Parser) parse_any_type(language ast.Language, is_ptr bool, check_dot b
|
|||
// p.expr_mod is from the struct and not from the generic parameter
|
||||
name = p.expr_mod + '.' + name
|
||||
} else if name in p.imported_symbols {
|
||||
check := !p.imported_symbols_used[name]
|
||||
name = p.imported_symbols[name]
|
||||
if !p.imported_symbols_used[name] {
|
||||
if check {
|
||||
p.register_used_import_for_symbol_name(name)
|
||||
}
|
||||
} else if !p.builtin_mod && name.len > 1 && name !in p.table.type_idxs {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue