| 1 | // Copyright 2024 The Go Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
| 5 | package c |
| 6 | |
| 7 | import ( |
| 8 | "./a" |
| 9 | "./b" |
| 10 | ) |
| 11 | |
| 12 | type c[V any] = struct { |
| 13 | G b.B[[3]V] |
| 14 | } |
| 15 | |
| 16 | var S struct{ F int } = a.B{} |
| 17 | var T struct{ F int } = a.F() |
| 18 | |
| 19 | var U a.A[string] = (*string)(nil) |
| 20 | var V a.A[int] = (*int)(nil) |
| 21 | |
| 22 | var W b.B[string] = struct{ F *[]string }{} |
| 23 | var X b.B[int] = struct{ F *[]int }{} |
| 24 | |
| 25 | var Y c[string] = struct{ G struct{ F *[][3]string } }{} |
| 26 | var Z c[int] = struct{ G struct{ F *[][3]int } }{} |