New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/compile: esc.go fails to mark anonymous receiver parameters as non-escaping #24305
Comments
Change https://golang.org/cl/99335 mentions this issue: |
This was already done for normal parameters, and the same logic applies for receiver parameters too. Updates #24305. Change-Id: Ia2a46f68d14e8fb62004ff0da1db0f065a95a1b7 Reviewed-on: https://go-review.googlesource.com/99335 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This looks fixed. Any problems with closing? |
This is half fixed. |
Still for 1.11, or do we put off to 1.12? |
Doesn't this have the obvious user workaround of applying the local purely local rewrite of I'd like to postpone this to unplanned. |
Still an issue with newescape. |
Change https://golang.org/cl/248217 mentions this issue: |
Updates #24305 Change-Id: Ib0b093e33004a978467cdd1e77186798392d4eca Reviewed-on: https://go-review.googlesource.com/c/go/+/248217 Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Compiling the above code with "go tool compile -m" outputs:
This doesn't happen if the receiver parameters are given a proper name, or if the receiver parameters are turned into normal parameters (i.e., changing the methods into functions).
The direct calls (
t.M()
andt.N()
) are because(*EscState).esctag
's unnamed parameter loop only touchesfn.Type.Params()
, notfn.Type.Recvs()
.The indirect calls (
(*T).M(&t)
and(*T).N(&t)
) appear to be because esc.go just doesn't look for esc tags for methods called as functions.The text was updated successfully, but these errors were encountered: