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

parser: fix not used parent warning for selective imports. closes #6916

This commit is contained in:
joe-conigliaro 2020-12-03 01:14:49 +11:00
parent 93fe2ce22d
commit ce1fa1194d
No known key found for this signature in database
GPG Key ID: C12F7136C08206F1

View File

@ -1620,7 +1620,7 @@ fn (mut p Parser) import_stmt() ast.Import {
} }
if p.tok.kind == .lcbr { // import module { fn1, Type2 } syntax if p.tok.kind == .lcbr { // import module { fn1, Type2 } syntax
p.import_syms(mut node) p.import_syms(mut node)
p.register_used_import(mod_name) // no `unused import` msg for parent p.register_used_import(mod_alias) // no `unused import` msg for parent
} }
pos_t := p.tok.position() pos_t := p.tok.position()
if import_pos.line_nr == pos_t.line_nr { if import_pos.line_nr == pos_t.line_nr {