1
0
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:
joe-conigliaro 2020-08-18 07:39:40 +10:00
parent 0d7cc8829a
commit c599a4c7de
No known key found for this signature in database
GPG Key ID: C12F7136C08206F1

View File

@ -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 {