cmd/compile: cleanup the extra "func" in closure name #55980
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
Coming here from https://go-review.googlesource.com/c/go/+/437216/2..3/test/closure3.dir/main.go#b255.
Currently, the compiler names the closures base on the outer function:
For:
Unified IR generates
main.func1.func2
, while the old frontend generatesmain.func1.2
. The discrepancy happens when callingir.NameClosure
. The old frontend use the immediate outer function (return func(y int) int { ... }
) as outer function, while Unified IR use the outer most (func main() { ... }
).@mdempsky think that the
func
prefix may not be necessary, and we can remove it.The text was updated successfully, but these errors were encountered: