cmd/compile: dev.typeparams: struct with generic parameter triggers 0xb01dfacedebac1e panic on macos #47272
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Sorry, I'm not exactly sure how to categorize this because the panic happens at runtime but the issue seems to be the result of something funky that happened during compilation:
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
N/A
What operating system and processor architecture are you using (
go env
)?Running on:
macOS Big Sur 11.4
with2.6 GHz 6-Core Intel Core i7
and16 GB 2667 MHz DDR4
go env
OutputWhat did you do?
Ran this code with
go run -gcflags="-G=3" .
:What did you expect to see?
What did you see instead?
Apparently related to 0xb01dfacedebac1e
Notes:
fmt.Println(x, y)
withfmt.Println(x)
avoids the above faulty := Err[int, error](errors.New("test"))
withy := Err[int, string]("test")
avoids the faultThis seems to be related to instantiating the generic
Result[T,E any]
with anE
oferror
and then trying to use reflection on that value fromfmt.Sprintf("Err(%v)", <val of type E>)
The text was updated successfully, but these errors were encountered: