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 func run() { // ERROR "cannot inline run: recursive" 10 f := func() { // ERROR "can inline run.func1 with cost .* as:.*" "func literal does not escape" 11 g() // ERROR "inlining call to g" 12 } 13 f() // ERROR "inlining call to run.func1" "inlining call to g" 14 run() 15 } 16 17 func g() { // ERROR "can inline g with cost .* as:.*" 18 } 19 20 func main() { // ERROR "can inline main with cost .* as:.*" 21 run() 22 } 23