test/typeparam/issue50481b.dir/b.go
raw| 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 b |
| 6 | |
| 7 | import "fmt" |
| 8 | |
| 9 | type Foo[T1 ~string, T2 ~int] struct { |
| 10 | ValueA T1 |
| 11 | ValueB T2 |
| 12 | } |
| 13 | |
| 14 | func (f *Foo[_, _]) String() string { |
| 15 | return fmt.Sprintf("%v %v", f.ValueA, f.ValueB) |
| 16 | } |