mirror of
https://github.com/golang/go
synced 2024-11-23 06:10:05 -07:00
cmd/compile: fix array case in types-for-register parameter
Corrected typo/thinko. We should keep the test for this, but it doesn't run yet because of reflection as far as I know (but I am not testing w/ GOEXPERIMENT). See https://github.com/golang/go/issues/44816#issuecomment-805297295 Updates #40724 Updates #44816 Change-Id: Ia12d0d4db00a8ec7174e72de460173876bd17874 Reviewed-on: https://go-review.googlesource.com/c/go/+/304233 Trust: David Chase <drchase@google.com> Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
This commit is contained in:
parent
87a3ac5f53
commit
14ef2d8c01
@ -168,7 +168,7 @@ func appendParamTypes(rts []*types.Type, t *types.Type) []*types.Type {
|
||||
typ := t.Kind()
|
||||
switch typ {
|
||||
case types.TARRAY:
|
||||
for i := int64(0); i < t.Size(); i++ { // 0 gets no registers, plus future-proofing.
|
||||
for i := int64(0); i < t.NumElem(); i++ { // 0 gets no registers, plus future-proofing.
|
||||
rts = appendParamTypes(rts, t.Elem())
|
||||
}
|
||||
case types.TSTRUCT:
|
||||
|
Loading…
Reference in New Issue
Block a user