blob: 89b9bcb87775ea5888ede70fadd1f39bbb24f315 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
package a
type Builder[T any] struct{}
func (r Builder[T]) New() T {
var v T
return v
}
func (r Builder[T]) New2() T {
return r.New()
}
func BuildInt() int {
return Builder[int]{}.New()
}
|