Source file test/typeparam/issue51832.go
1 // compile 2 3 // Copyright 2022 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 F func() F 10 11 func do[T any]() F { 12 return nil 13 } 14 15 type G[T any] func() G[T] 16 17 //go:noinline 18 func dog[T any]() G[T] { 19 return nil 20 } 21 22 func main() { 23 do[int]() 24 dog[int]() 25 } 26