go/types, types2: generic type inference - generic interface input parameter of generic function #62612
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
TypeInference
Issue is related to generic type inference
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
NO
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I tried to compile my project (that used to compile successfully with Go 1.20) but I got an error.
I made a function getting a parameter with generic interface type.
Then I called that function like this.
Result of build is
But go 1.20 builds that code well.
And why only B cannot be inferred?
https://go.dev/play/p/VxOg1KSvJdz
This is playgroud to reproduce that error but it raises error "cannot infer D" not B.
What did you expect to see?
no error as it is with go 1.20
What did you see instead?
The text was updated successfully, but these errors were encountered: