mirror of
https://github.com/golang/go.git
synced 2026-06-27 03:11:23 +00:00
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:
parent
afcf04cb64
commit
373b3a9097
1 changed files with 2 additions and 2 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue