You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generally, this would be handled by dowidth setting Broke on invalid recursive struct types. Also, algtype checks for Broke.
The problem is we're calling algtype to validate map key types during typechecking before we've called dowidth on those key types, and before it's even safe to do so.
We have some logic for deferring map key type validation until it's safe. I think the solution is to extend that to defer validation more often, maybe even all the time.
What version of Go are you using (
go version
)?go version go1.9 linux/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?What did you do?
Attempt to build the following program:
What did you expect to see?
go build
should report something like recursive type errors, then terminate with exit code 1 without panic.What did you see instead?
The text was updated successfully, but these errors were encountered: