checker: remove pos+1 on innermost call

pull/6157/head
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
1 changed files with 1 additions and 1 deletions

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 {