go/parser: inconsistent error messages when missing braces after struct/interface in return type #36595
Labels
gopls/parsing
Issues related to parsing / poor parser recovery.
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
Please answer these questions before submitting your issue. Thanks!
What did you do?
Three files.
what.go
:what_test.go
what_test2.go
Now, remove the
{}
afterstruct
inready
's return value.What did you expect to see?
Preferably, recovery from this situation (that might be another issue about how to deal with these parsing issues), and consistent-ish diagnostics with the issue.
What did you see instead?
No recovery, so everything that comes after is broken. But, it's only for that one type, and the diagnostics / hover behavior of things is pretty inconsistent.
A screencast: https://streamable.com/xc1k0
https://gist.github.com/zikaeroh/e752451719bff6020ba8a981678c9184
Build info
Go info
The text was updated successfully, but these errors were encountered: