cmd/compile: inconsistent generics behaviour #48389
Labels
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.
release-blocker
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Latest master
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
The below programs fails to build with error whereas a similar program with string replaced with int compiles fine. Not sure if this is a bug or expected.
./main4.go:9:16: cannot convert in (variable of type parameter T constrained by Constraint) to string
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: