test: update newinline.go for closure name change

CL 770200 simplified closure names. It missed the newinline test
which matches closure names. Update the test.

Should fix the newinliner builder.

Change-Id: I04584a08f00de4dbedb1e2e9e333e08e88154659
Reviewed-on: https://go-review.googlesource.com/c/go/+/775620
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
Cherry Mui 2026-05-07 22:14:46 -04:00
parent afcf04cb64
commit 373b3a9097

View file

@ -119,13 +119,13 @@ func r(z int) int { // ERROR "can inline r"
return x + z
}
bar := func(x int) int { // ERROR "func literal does not escape" "can inline r.func2"
return x + func(y int) int { // ERROR "can inline r.func2.1" "can inline r.r.func2.func3"
return x + func(y int) int { // ERROR "can inline r.func2.1" "can inline r.func2.func1"
return 2*y + x*z
}(x) // ERROR "inlining call to r.func2.1"
}
_ = foo // prevent simple deadcode elimination
_ = bar // prevent simple deadcode elimination
return foo(42) + bar(42) // ERROR "inlining call to r.func1" "inlining call to r.func2" "inlining call to r.r.func2.func3"
return foo(42) + bar(42) // ERROR "inlining call to r.func1" "inlining call to r.func2 " "inlining call to r.func2.func1"
}
func s0(x int) int { // ERROR "can inline s0"