]> Cypherpunks.ru repositories - gostls13.git/commit
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)
committerRobert Griesemer <gri@golang.org>
Wed, 9 Mar 2022 21:26:42 +0000 (21:26 +0000)
commitb8248fab897da9bee2211a98df1656883ccecd6d
treea1d00b6b70ae1087bff48530187d0bd25c7171cb
parent7026eeb8cfdc5801adddaaa678fb6495a998db0e
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>
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