commit | 6f0482744cab9ab0f859f77e8969589e5158f807 | [log] [tgz] |
---|---|---|
author | Edward Muller <edwardam@interlix.com> | Fri Jun 14 20:22:20 2019 +0000 |
committer | Rebecca Stambler <rstambler@golang.org> | Fri Jun 14 20:25:48 2019 +0000 |
tree | 2a602de5b319e03d4c8c9ab31d8c1c1421609add | |
parent | 9a3b5d688fe624c74a0b8352b023249b01218cd3 [diff] |
internal/lsp/cache: fix nil check by adding missing "continue" Without this accessing gof.ast.file.Pos() will panic if gof.ast.file is nil Change-Id: I829f3667d201f026fcf0475f4fdabce0aced58f8 Change-Id: I829f3667d201f026fcf0475f4fdabce0aced58f8 GitHub-Last-Rev: 777c015d691bf0d14cab5bb0bca6749cc9bdf605 GitHub-Pull-Request: golang/tools#119 Reviewed-on: https://go-review.googlesource.com/c/tools/+/182420 Reviewed-by: Ian Cottrell <iancottrell@google.com> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
diff --git a/internal/lsp/cache/check.go b/internal/lsp/cache/check.go index 38b3632..32bd381 100644 --- a/internal/lsp/cache/check.go +++ b/internal/lsp/cache/check.go
@@ -178,6 +178,7 @@ } if gof.ast.file == nil { imp.view.session.log.Errorf(ctx, "no AST for %s", filename) + continue } pos := gof.ast.file.Pos() if !pos.IsValid() {