x/tools/gopls: invalid completions on RHS of ":=" #39203
On gopls master (91d71f6):
fooBar := fo<>
You get a completion for "fooBar" which doesn't make sense since "fooBar" isn't declared yet. We have a similar special case check for "var" declarations, so we probably just need to apply it to ":=" as well. ":=" is a bit trickier since some of the LHS values might already be declared.
The text was updated successfully, but these errors were encountered:
In the below example: fooBar := fooB<> We will no longer suggest "fooBar" at <>. Fixes golang/go#39203. Change-Id: Ie1450397ce3de4f21fb0862c1a4f0fe2812325fd Reviewed-on: https://go-review.googlesource.com/c/tools/+/275693 Run-TryBot: Muir Manders <email@example.com> gopls-CI: kokoro <firstname.lastname@example.org> TryBot-Result: Go Bot <email@example.com> Reviewed-by: Rebecca Stambler <firstname.lastname@example.org> Trust: Rebecca Stambler <email@example.com> Trust: Robert Findley <firstname.lastname@example.org>