1
2
3
4
5 package issue22856
6
7 type T struct{}
8
9 func New() T { return T{} }
10 func NewPointer() *T { return &T{} }
11 func NewPointerSlice() []*T { return []*T{&T{}} }
12 func NewSlice() []T { return []T{T{}} }
13 func NewPointerOfPointer() **T { x := &T{}; return &x }
14 func NewArray() [1]T { return [1]T{T{}} }
15 func NewPointerArray() [1]*T { return [1]*T{&T{}} }
16
17
18
19 func NewSliceOfSlice() [][]T { return []T{[]T{}} }
20
21
22
23 func NewPointerSliceOfSlice() [][]*T { return []*T{[]*T{}} }
24
25
26
27 func NewSlice3() [][][]T { return []T{[]T{[]T{}}} }
28
View as plain text