mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: remove pos+1 on innermost call
This commit is contained in:
parent
0d7cc8829a
commit
c599a4c7de
@ -2551,7 +2551,7 @@ pub fn (mut c Checker) ident(mut ident ast.Ident) table.Type {
|
||||
return info.typ
|
||||
} else if ident.kind == .unresolved {
|
||||
// first use
|
||||
start_scope := c.file.scope.innermost(ident.pos.pos + 1)
|
||||
start_scope := c.file.scope.innermost(ident.pos.pos)
|
||||
if obj1 := start_scope.find(ident.name) {
|
||||
match mut obj1 as obj {
|
||||
ast.GlobalDecl {
|
||||
|
Loading…
Reference in New Issue
Block a user