]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: fix import/export of ODYNAMICDOTTYPE
authorMatthew Dempsky <mdempsky@google.com>
Fri, 5 Aug 2022 23:09:22 +0000 (16:09 -0700)
committerGopher Robot <gobot@golang.org>
Sat, 6 Aug 2022 15:20:00 +0000 (15:20 +0000)
commit0c4db1e347dc51589e5289388305b02108ca0aa1
tree0820140d0df29cdaf8531fe8e0fdf81b2f5aaf4e
parentd75e186e2c013d04548940eae913824bae9d7c48
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 #54302.

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>
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]