]> Cypherpunks.ru repositories - gostls13.git/commit
test: relax closure name matching in closure3.go
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Fri, 30 Sep 2022 17:23:48 +0000 (00:23 +0700)
committerGopher Robot <gobot@golang.org>
Sat, 1 Oct 2022 01:52:16 +0000 (01:52 +0000)
commit0cbe30467ad2b4823bc07a8784ca66aff7cdb20a
treed8811d8d020f2d41d73190d728965d410150b209
parentdd7ce26abf7cf431e7cecf6153fbb8730b1da686
test: relax closure name matching in closure3.go

The mismatch between Unified IR and the old frontend is not about how
they number the closures, but how they name them. For nested closure,
the old frontend use the immediate function which contains the closure
as the outer function, while Unified IR uses the outer most function as
the outer for all closures.

That said, what important is matching the number of closures, not their
name prefix. So this CL relax the test to match both "main.func1.func2"
and "main.func1.2" to satisfy both Unified IR and the old frontend.

Updates #53058

Change-Id: I66ed816d1968aa68dd3089a4ea5850ba30afd75b
Reviewed-on: https://go-review.googlesource.com/c/go/+/437216
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
test/closure3.dir/main.go
test/run.go