diff options
Diffstat (limited to 'test/typeparam/issue50598.dir/a0.go')
-rw-r--r-- | test/typeparam/issue50598.dir/a0.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/typeparam/issue50598.dir/a0.go b/test/typeparam/issue50598.dir/a0.go new file mode 100644 index 0000000..61d353e --- /dev/null +++ b/test/typeparam/issue50598.dir/a0.go @@ -0,0 +1,23 @@ +// Copyright 2022 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package a0 + +type Builder[T any] struct{} + +func (r Builder[T]) New1() T { + var v T + return v +} + +func (r Builder[T]) New2() T { + var v T + return v +} + +type IntBuilder struct{} + +func (b IntBuilder) New() int { + return Builder[int]{}.New2() +} |