mirror of
https://github.com/golang/go
synced 2024-11-18 11:04:42 -07:00
internal/lsp/source: add extra nil check in searchForEnclosing
I still keep seeing this crash too, even after CL 244841. Fixes golang/go#40464 Change-Id: Ic587045e65f34c24bd6df452e24517fd90e36bbe Reviewed-on: https://go-review.googlesource.com/c/tools/+/245440 Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
This commit is contained in:
parent
e8769ccb43
commit
df70183b18
@ -248,6 +248,9 @@ func searchForEnclosing(info *types.Info, path []ast.Node) types.Type {
|
||||
}
|
||||
}
|
||||
}
|
||||
if exported == nil {
|
||||
return nil
|
||||
}
|
||||
return exported
|
||||
}
|
||||
case *ast.CompositeLit:
|
||||
|
Loading…
Reference in New Issue
Block a user