cmd/compile: type parameter unexpectedly does not implement constraint #56716
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
FrozenDueToAge
generics
Issue is related to generics
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
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Run the issue reported at
https://groups.google.com/g/golang-nuts/c/_-vNSfDmPG8?pli=1
both on the playground
https://go.dev/play/p/GS_x9Y8HOMK
as well as locally with go run [temp go file]
@ianlancetaylor suggested in that Google group thread that there is merit to record this as a bug, to be further looked at.
It felt interesting so I recorded it, despite not being the original submitter from the group (apologies if duplicate).
What did you expect to see?
Potentially the program successfully build
What did you see instead?
command-line-arguments
./test.go:22:41: []T does not implement Scalar|Vector ([]T missing in int | float32 | float64 | []int | []float32 | []float64)
./test.go:24:19: []T does not implement Scalar|Vector ([]T missing in int | float32 | float64 | []int | []float32 | []float64)
The text was updated successfully, but these errors were encountered: