]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: fix compilation of inferred type arguments
authorMatthew Dempsky <mdempsky@google.com>
Wed, 3 May 2023 21:53:03 +0000 (14:53 -0700)
committerGopher Robot <gobot@golang.org>
Wed, 3 May 2023 22:12:27 +0000 (22:12 +0000)
commit767fbe01aeb32d8fe72bb40fa0cc144a7263045b
treed60f971810600313e9cc5b3bfe4ee050b76b2b2d
parentaa6e16848041f07b004c7247cfe6b14bf64bcd22
cmd/compile: fix compilation of inferred type arguments

Previously, type arguments could only be inferred for generic
functions in call expressions, whereas with the reverse type inference
proposal they can now be inferred in assignment contexts too. As a
consequence, we now need to check Info.Instances to find the inferred
type for more cases now.

Updates #59338.
Fixes #59955.

Change-Id: I9b6465395869459c2387d0424febe7337b28b90e
Reviewed-on: https://go-review.googlesource.com/c/go/+/492455
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/noder/writer.go
test/fixedbugs/issue59338.go