diff options
Diffstat (limited to 'test/typeparam/issue45817.go')
-rw-r--r-- | test/typeparam/issue45817.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/typeparam/issue45817.go b/test/typeparam/issue45817.go index 744698f40b..1efee3b0af 100644 --- a/test/typeparam/issue45817.go +++ b/test/typeparam/issue45817.go @@ -13,11 +13,12 @@ import ( type s[T any] struct { a T } + func (x s[T]) f() T { return x.a } func main() { - x := s[int]{a:7} + x := s[int]{a: 7} f := x.f if got, want := f(), 7; got != want { panic(fmt.Sprintf("got %d, want %d", got, want)) |