We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider the following piece of code:
type bar[T any] interface { Bar(int) } type foo[T any] interface { bar[T] *T } func Foo[T any, F foo[T]](d int) { m := new(T) F(m).Bar(d) }
I expected that type of the receiver object F(m) is foo[T]. However, it seems that ssa assignes it type T. Here is the output of ssadump.
F(m)
foo[T]
T
func Foo[T any, F foo[T]](d int): 0: entry P:0 S:0 t0 = new T (new) *T t1 = changetype F <- *T (t0) F t2 = *t1 T t3 = invoke t2.Bar(d) () return
The text was updated successfully, but these errors were encountered:
Change https://go.dev/cl/548375 mentions this issue: go/ssa: do not load type parameter method receivers
go/ssa: do not load type parameter method receivers
Sorry, something went wrong.
golang/tools@dcabb5c
timothy-king
No branches or pull requests
Consider the following piece of code:
I expected that type of the receiver object
F(m)
isfoo[T]
. However, it seems that ssa assignes it typeT
. Here is the output of ssadump.The text was updated successfully, but these errors were encountered: