]> Cypherpunks repositories - gostls13.git/commit
[dev.typeparams] cmd/compile: fix HasShape, add dottype test
authorKeith Randall <khr@golang.org>
Sat, 24 Jul 2021 21:11:27 +0000 (14:11 -0700)
committerKeith Randall <khr@golang.org>
Sat, 24 Jul 2021 22:49:24 +0000 (22:49 +0000)
commitb27c7e30dc5d222766057e62c16cb765b636d244
tree44c9e86c068a2f8e5e8d5a387693502a15e39788
parenta2e2b0362bb2e7b93de668007027d08888bc9a38
[dev.typeparams] cmd/compile: fix HasShape, add dottype test

HasShape needs a TINTER case.

Add a test for x.(T) in various situations. Needs the fix above.

Also remove ONEW unshapify case. It is ok for ONEW to have a shape
type, as it will just be passed to mallocgc, or possibly used as a
stack object type, both of which are ok.

Change-Id: Ibddf8f5c8c254d32cb5ebcaca7dc94b4c00ab893
Reviewed-on: https://go-review.googlesource.com/c/go/+/337231
Trust: Keith Randall <khr@golang.org>
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
src/cmd/compile/internal/noder/stencil.go
src/cmd/compile/internal/types/type.go
test/typeparam/dottype.go [new file with mode: 0644]
test/typeparam/dottype.out [new file with mode: 0644]