mirror of
https://github.com/golang/go.git
synced 2026-04-02 01:10:27 +09:00
Might as well, we don't need any registers for such values. Fixes #77635 Change-Id: Iedc1bc3f13662b043b183228bcc1dc4e6c91da81 Reviewed-on: https://go-review.googlesource.com/c/go/+/747780 Reviewed-by: Junyang Shao <shaojunyang@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
24 lines
441 B
Go
24 lines
441 B
Go
// compile
|
|
|
|
// Copyright 2026 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// Issue 77635: test building values of zero-sized types.
|
|
|
|
package main
|
|
|
|
import "reflect"
|
|
|
|
func F[T interface{ [2][0]int }](x T) bool {
|
|
return reflect.DeepEqual(struct {
|
|
t T
|
|
c chan int
|
|
}{t: x}, 1)
|
|
}
|
|
|
|
func main() {
|
|
var t [2][0]int
|
|
F(t)
|
|
}
|