]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.18] go/types, types2: disable field accesses through type parameters
authorRobert Griesemer <gri@golang.org>
Wed, 9 Mar 2022 18:01:24 +0000 (10:01 -0800)
committerDmitri Shuralyov <dmitshur@golang.org>
Thu, 10 Mar 2022 23:59:19 +0000 (23:59 +0000)
commit36d32da19fedf6ef047f58d69818e5b2011c30b6
tree5534351572575a92c7333f0bd2ad1d4932b9621e
parent1e4dc06f1ac1caa36eefb9eb0835010a66d9f29e
[release-branch.go1.18] go/types, types2: disable field accesses through type parameters

This is a feature that is not understood well enough and may have
subtle repercussions impacting future changes. Disable for Go 1.18.

The actual change is trivial: disable a branch through a flag.
The remaining changes are adjustments to tests.

Fixes #51576.

Change-Id: Ib77b038b846711a808315a8889b3904e72367bce
Reviewed-on: https://go-review.googlesource.com/c/go/+/391135
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
(cherry picked from commit b8248fab897da9bee2211a98df1656883ccecd6d)
Reviewed-on: https://go-review.googlesource.com/c/go/+/391355
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
13 files changed:
src/cmd/compile/internal/types2/lookup.go
src/cmd/compile/internal/types2/testdata/fixedbugs/issue50417.go2
src/cmd/compile/internal/types2/testdata/fixedbugs/issue50782.go2
src/go/types/lookup.go
src/go/types/testdata/fixedbugs/issue50417.go2
src/go/types/testdata/fixedbugs/issue50782.go2
test/typeparam/absdiff2.go
test/typeparam/absdiffimp2.dir/a.go
test/typeparam/issue50417.go
test/typeparam/issue50417b.go
test/typeparam/issue50690a.go
test/typeparam/issue50690b.go
test/typeparam/issue50690c.go