mirror of
https://github.com/golang/go
synced 2024-09-30 22:48:32 -06:00
internal/lsp: fix nil pointer when propagating diagnostics
Fixes golang/go#32030 Change-Id: I5ae7f2dc68c68c1a4851c637dcb75f312b0b35f5 Reviewed-on: https://go-review.googlesource.com/c/tools/+/177057 Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Cottrell <iancottrell@google.com>
This commit is contained in:
parent
4789ca9922
commit
2d081dbd58
@ -74,6 +74,9 @@ func Diagnostics(ctx context.Context, v View, uri span.URI) (map[span.URI][]Diag
|
||||
// Updates to the diagnostics for this package may need to be propagated.
|
||||
for _, f := range f.GetActiveReverseDeps(ctx) {
|
||||
pkg := f.GetPackage(ctx)
|
||||
if pkg == nil {
|
||||
continue
|
||||
}
|
||||
for _, filename := range pkg.GetFilenames() {
|
||||
reports[span.FileURI(filename)] = []Diagnostic{}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user