x/tools/gopls: TestXxx()
completions not working when location followed by newline, due to parser error recovery
#61371
Labels
gopls/completion
Issues related to auto-completion in gopls.
gopls/parsing
Issues related to parsing / poor parser recovery.
gopls
Issues related to the Go language server, gopls.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
gopls version
Affects versions >=0.12.0, including current master.
go env
What did you do?
When triggering completions in test files, such as:
What did you expect to see?
TestXxx
as one of the completions.What did you see instead?
TestMain
andTest
Editor and settings
n/a
Logs
Debugging journey
My debugging indicates that this started happening since https://go-review.googlesource.com/c/tools/+/459559.
It seems that
t.Closing != t.Opening
unless the completion is triggered at the end of the file.To replicate with existing tests:
The text was updated successfully, but these errors were encountered: