/
githubmirror
/
go
Обзор
Документация
Войти
/
githubmirror
/
go
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/fixedbugs/issue73716.go
37 строк
529 B
Yongyue Sun
cmd/compile: create LSym for closures with type conversion
15 май 2025, 23:16
15 май 2025, 23:16
fc641e7
Код
Авторство
О чём код?
// build // Copyright 2025 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Issue 73716: cmd/compile: unnamed functions missing FuncInfo package main import "fmt" type EP func() type F func(EP) EP func main() { eps := []EP{ep1, ep2} var h EP for _, ep := range eps { h = F(func(e EP) EP { return func() { ep() e() } })(h) } h() } func ep1() { fmt.Printf("ep1\n") } func ep2() { fmt.Printf("ep2\n") }