]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix implement for closure in a global assignment
authorkorzhao <korzhao95@gmail.com>
Thu, 9 Sep 2021 13:51:43 +0000 (21:51 +0800)
committerDan Scales <danscales@google.com>
Thu, 9 Sep 2021 21:28:56 +0000 (21:28 +0000)
commitc981874a5a87605b446b3a56abba9907d17e8493
tree991256e015b825eb285ba36149f5bc32de759109
parent2c4f389c0298a37f1f3c000ad8b87e65d46c757f
cmd/compile: fix implement for closure in a global assignment

If closure in a global assignment and has a method receiver.
We should assign receiver as a global variable, not a local variable.

Fixes #48225

Change-Id: I8f65dd6e8baf66a5eff24028d28ad0a594091add
Reviewed-on: https://go-review.googlesource.com/c/go/+/348512
Run-TryBot: Dan Scales <danscales@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Trust: Dan Scales <danscales@google.com>
src/cmd/compile/internal/noder/stencil.go
test/typeparam/issue48225.go [new file with mode: 0644]