]> Cypherpunks repositories - gostls13.git/commit
go/types, types2: no need to revert tparam renaming in inference results
authorRobert Findley <rfindley@google.com>
Mon, 14 Feb 2022 01:27:55 +0000 (20:27 -0500)
committerRobert Findley <rfindley@google.com>
Mon, 14 Feb 2022 12:26:56 +0000 (12:26 +0000)
commit875a6d40107d560473d1590425a096dd4cee346f
treeecd094e849bc528796f2d091f21f1dbfc9cfa12d
parentbadbc52d82b1f97861bf30457014fc9ea19dfcb2
go/types, types2: no need to revert tparam renaming in inference results

This is a follow up to CL 385494. In early patch sets of that CL,
renamed type parameters were substituted in arguments, which meant that
they could leak into the inference results. However, we subsequently
realized that we could instead substitute in the signature parameters.
In this case it is not possible for the substituted type parameters to
appear in the resulting type arguments, so there is no need to
un-substitute.

Change-Id: I4da45b0b8d7ad809d0ddfa7061ae5f6f07895540
Reviewed-on: https://go-review.googlesource.com/c/go/+/385574
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/cmd/compile/internal/types2/infer.go
src/go/types/infer.go