Source file test/typeparam/issue47514.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 // Test that closures inside a generic function are not exported, 8 // even though not themselves generic. 9 10 package main 11 12 func Do[T any]() { 13 _ = func() string { 14 return "" 15 } 16 } 17 18 func main() { 19 Do[int]() 20 } 21