1// run 2 3// Copyright 2020 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 7package main 8 9func g(f func()) { 10} 11 12// Must have exportable name 13func F() { 14 g(func() { 15 ch := make(chan int) 16 for { 17 select { 18 case <-ch: 19 return 20 default: 21 } 22 } 23 }) 24} 25 26func main() { 27 F() 28} 29