gopls/internal/golang/completion: avoid crash in addFieldItems
For now, be defensive and avoid the crash reported in golang/go#72828. No attempt was made to reproduce. Longer term, as the TODO indicates, we should investigate the logic error that leads to addFieldItems being called with nil surrounding. Fixes golang/go#72828 Change-Id: I2300406b49fc3d53561b288d42f64793429e3fbd Reviewed-on: https://go-review.googlesource.com/c/tools/+/659237 Reviewed-by:Jonathan Amsterdam <jba@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Robert Findley <rfindley@google.com>
Please register or sign in to comment