This error reporting code path did not have test coverage, and panics in
1.17 (filed as #48082).
Add a test that would have reproduced the panic, for both go/types and
Trust: Robert Findley <email@example.com>
Run-TryBot: Robert Findley <firstname.lastname@example.org>
Reviewed-by: Robert Griesemer <email@example.com>
TryBot-Result: Go Bot <firstname.lastname@example.org>
Though this panic should be rare, it has manifested at least once in in a vscode-go gopls crash report, and in a Google internal crash report. It is a regression, and in my opinion is worth fixing for 1.17.1. Marked as a release blocker to make sure it is not missed in any case.