]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.18] go/types, types2: disable inference for type instances
authorRobert Findley <rfindley@google.com>
Thu, 24 Feb 2022 19:18:24 +0000 (14:18 -0500)
committerDmitri Shuralyov <dmitshur@golang.org>
Tue, 8 Mar 2022 00:42:40 +0000 (00:42 +0000)
commit673d52b33a47b0f49159cbcc19b900344c85d50f
treefa1e9e77198b174679a3284fe573f03873e5a717
parente3f9a4f2ae5a4c0d51b01e8895002325e98b5802
[release-branch.go1.18] go/types, types2: disable inference for type instances

Inference for type instances has dependencies on type-checking order
that can lead to subtle bugs. As explained in #51527, disable it for
1.18.

Fixes #51527

Change-Id: I42795bad30ce53abecfc5a4914599ae5a2041a9e
Reviewed-on: https://go-review.googlesource.com/c/go/+/387934
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
(cherry picked from commit 28fab5ef21d8aef72634f9c251fbeb4039dababa)
Reviewed-on: https://go-review.googlesource.com/c/go/+/390576
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
17 files changed:
src/cmd/compile/internal/types2/testdata/check/typeinference.go2
src/cmd/compile/internal/types2/testdata/fixedbugs/issue49541.go2
src/cmd/compile/internal/types2/testdata/fixedbugs/issue50929.go2
src/cmd/compile/internal/types2/testdata/fixedbugs/issue51232.go2
src/cmd/compile/internal/types2/testdata/fixedbugs/issue51233.go2
src/cmd/compile/internal/types2/testdata/fixedbugs/issue51339.go2
src/cmd/compile/internal/types2/typexpr.go
src/go/types/errorcodes.go
src/go/types/testdata/check/typeinference.go2
src/go/types/testdata/fixedbugs/issue49541.go2
src/go/types/testdata/fixedbugs/issue50929.go2
src/go/types/testdata/fixedbugs/issue51232.go2
src/go/types/testdata/fixedbugs/issue51233.go2
src/go/types/testdata/fixedbugs/issue51339.go2
src/go/types/typexpr.go
test/typeparam/issue51232.go
test/typeparam/issue51233.go