Source file test/fixedbugs/issue54159.go
1 // errorcheck -0 -m=2 2 3 // Copyright 2023 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 //go:noinline 10 func run() { // ERROR "cannot inline run: marked go:noinline" 11 f := func() { // ERROR "can inline run.func1 with cost .* as:.*" "func literal does not escape" 12 g() // ERROR "inlining call to g" 13 } 14 f() // ERROR "inlining call to run.func1" "inlining call to g" 15 _ = f 16 run() 17 } 18 19 func g() { // ERROR "can inline g with cost .* as:.*" 20 } 21 22 func main() { // ERROR "can inline main with cost .* as:.*" 23 run() 24 } 25