mirror of
https://github.com/golang/go
synced 2024-11-02 13:42:29 +00:00
644543dd64
In typecheckclosure, a xfunc node will be put to xtop. But that node can be shared between multiple closures, like in a const declaration group: const ( x = unsafe.Sizeof(func() {}) y ) It makes a xfunc node appears multiple times in xtop, causing duplicate initLSym run. To fix this issue, we only do typecheck for xfunc one time, and setup closure node earlier in typecheckclosure process. Fixes #30709 Change-Id: Ic924a157ee9f3e5d776214bef5390849ddc8aab9 Reviewed-on: https://go-review.googlesource.com/c/go/+/172298 Reviewed-by: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
4 lines
20 B
Text
4 lines
20 B
Text
true
|
|
true
|
|
true
|
|
true
|