test/fixedbugs/issue77635.go
raw| 1 | // compile |
| 2 | |
| 3 | // Copyright 2026 The Go Authors. All rights reserved. |
| 4 | // Use of this source code is governed by a BSD-style |
| 5 | // license that can be found in the LICENSE file. |
| 6 | |
| 7 | // Issue 77635: test building values of zero-sized types. |
| 8 | |
| 9 | package main |
| 10 | |
| 11 | import "reflect" |
| 12 | |
| 13 | func F[T interface{ [2][0]int }](x T) bool { |
| 14 | return reflect.DeepEqual(struct { |
| 15 | t T |
| 16 | c chan int |
| 17 | }{t: x}, 1) |
| 18 | } |
| 19 | |
| 20 | func main() { |
| 21 | var t [2][0]int |
| 22 | F(t) |
| 23 | } |