/
githubmirror
/
go
Обзор
Документация
Войти
/
githubmirror
/
go
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/fixedbugs/issue60945.dir/a.go
22 строки
388 B
Cuong Manh Le
cmd/compile: scanning closures body when visiting wrapper function
23 июн 2023, 17:29
23 июн 2023, 17:29
6dce882
Код
Авторство
О чём код?
// Copyright 2023 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. package a type S struct{} func callClosure(closure func()) { closure() } func (s *S) M() { callClosure(func() { defer f(s.m) // prevent closures to be inlined. }) } func (s *S) m() {} //go:noinline func f(a ...any) {}