cmd/compile: "internal compiler error: unexpected Defn:" on if true { return } #48033
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, it used to compile on go 1.16
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
The code and playground links are below.
If I remove the
if true {}
block the code compiles.https://play.golang.org/p/hegRGlzb751
What did you expect to see?
A function that immediately returns
A compiled application.
What did you see instead?
A compiler bug.
The text was updated successfully, but these errors were encountered: