Source file test/typeparam/issue47775b.go
1 // run 2 3 // Copyright 2021 The Go Authors. All rights reserved. 4 // Use of this source code is governed by a BSD-style 5 // license that can be found in the LICENSE file. 6 7 package main 8 9 type C[T any] struct { 10 } 11 12 func (c *C[T]) reset() { 13 } 14 15 func New[T any]() { 16 c := &C[T]{} 17 i = c.reset 18 z(c.reset) 19 } 20 21 var i interface{} 22 23 func z(interface{}) { 24 } 25 26 func main() { 27 New[int]() 28 } 29