Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/lsp: fix crash completing recursive pointer types
We were recursing infinitely evaluating objects of recursive pointer types such as "type foo *foo". Now we track named pointer types we have already seen to avoid trying to dereference such objects forever. I lazily initialized the "seen" map to avoid the allocation in the normal case when you aren't dealing with named pointer types. Fixes golang/go#37104. Change-Id: I5f294cfc5a641e7b5fd24e1d9dc55520726ea560 Reviewed-on: https://go-review.googlesource.com/c/tools/+/218579 Run-TryBot: Muir Manders <muir@mnd.rs> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
- Loading branch information
1 parent
6dcdf1d
commit 61798d6
Showing
4 changed files
with
33 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters