Source file test/typeparam/issue50598.dir/a0.go
1 // Copyright 2022 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 a0 6 7 type Builder[T any] struct{} 8 9 func (r Builder[T]) New1() T { 10 var v T 11 return v 12 } 13 14 func (r Builder[T]) New2() T { 15 var v T 16 return v 17 } 18 19 type IntBuilder struct{} 20 21 func (b IntBuilder) New() int { 22 return Builder[int]{}.New2() 23 } 24