]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.19] cmd/compile: fix import/export of ODYNAMICDOTTYPE
authorMatthew Dempsky <mdempsky@google.com>
Fri, 5 Aug 2022 23:09:22 +0000 (16:09 -0700)
committerThan McIntosh <thanm@google.com>
Thu, 11 Aug 2022 12:53:59 +0000 (12:53 +0000)
commit3c200d6c81e75348e583297b1295f8e34b07b61c
treee0ae98c16eb06c0e33a32509482ca049ac727bd6
parent43456202a1e55da55666fac9d56ace7654a65b64
[release-branch.go1.19] cmd/compile: fix import/export of ODYNAMICDOTTYPE

The RType field isn't needed when performing type assertions from
non-empty interface types, because we use the ITab field instead. But
the inline body exporter didn't know to expect this.

It's possible we could use a single bool to distinguish whether
we're serializing the RType or ITab field, but using two is simpler
and seems safer.

Fixes #54309.

Change-Id: I9ddac72784fb2241fee0a0dee30493d868a2c259
Reviewed-on: https://go-review.googlesource.com/c/go/+/421755
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
(cherry picked from commit 0c4db1e347dc51589e5289388305b02108ca0aa1)
Reviewed-on: https://go-review.googlesource.com/c/go/+/421715
Reviewed-by: Than McIntosh <thanm@google.com>
src/cmd/compile/internal/typecheck/iexport.go
src/cmd/compile/internal/typecheck/iimport.go
test/typeparam/issue54302.dir/a.go [new file with mode: 0644]
test/typeparam/issue54302.dir/main.go [new file with mode: 0644]
test/typeparam/issue54302.go [new file with mode: 0644]