cmd/compile: unified IR needs to treat conversion of constants to type parameter type as non-constant #54307
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
FrozenDueToAge
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
This code compiles with Go 1.19, but currently fails with GOEXPERIMENT=unified because -1 is not representable by type uint.
Per the Go spec, "If the type is a type parameter, the constant is converted into a non-constant value of the type parameter."
(Noticed at https://github.com/lightstep/otel-launcher-go/blob/448fc6822e81fdde2763f224bd9c7f3bbf72309c/lightstep/sdk/metric/aggregator/histogram/structure/exponential.go#L640, while investigating #54302.)
The text was updated successfully, but these errors were encountered: