Source file test/typeparam/issue50552.dir/a.go

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

View as plain text