]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: reject not-in-heap types as type arguments
authorMatthew Dempsky <mdempsky@google.com>
Wed, 31 Aug 2022 22:48:35 +0000 (15:48 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Wed, 31 Aug 2022 23:52:00 +0000 (23:52 +0000)
commitca634fa2c550cd85a1a2cc03c208304ee38c6a82
tree4e87f78dde5a438f5f6a9888d920e4e3934d15ad
parente4b624eae5fa3c51b8ca808da29442d3e3aaef04
cmd/compile: reject not-in-heap types as type arguments

After running the types2 type checker, walk info.Instances to reject
any not-in-heap type arguments. This is feasible to check using the
types2 API now, thanks to #46731.

Fixes #54765.

Change-Id: Idd2acc124d102d5a76f128f13c21a6e593b6790b
Reviewed-on: https://go-review.googlesource.com/c/go/+/427235
Reviewed-by: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Keith Randall <khr@google.com>
src/cmd/compile/internal/noder/helpers.go
src/cmd/compile/internal/noder/irgen.go
test/typeparam/issue54765.go [new file with mode: 0644]