aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/obj
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2021-03-02 21:52:09 -0800
committerRobert Griesemer <gri@golang.org>2021-03-03 20:01:55 +0000
commit6db80d74200675e20c562684c0bcc6d12a5631eb (patch)
treec3147ccf2ea9f856fdcf127d637b34983c9ac2a2 /src/cmd/internal/obj
parentd6f6ef6358f15d6e49d949749869f199d99d5047 (diff)
downloadgo-6db80d74200675e20c562684c0bcc6d12a5631eb.tar.xz
cmd/compile/internal/types2: use correct recv for parameterized embedded methods
Methods of generic types are instantiated lazily (upon use). Thus, when we encounter a method of such a type, we need to instantiate the method signature with the receiver type arguments. We infer those type arguments from the method receiver. If the method is embedded, we must use the actual embedded receiver type, otherwise the receiver type declared with the method doesn't match up and inference will fail. (Note that there's no type inference in the source code here, it's only the implementation which uses the existing inference mechanism to easily identify the actual type arguments. If the implementation is correct, the inference will always succeed.) Updates #44688. Change-Id: Ie35b62bebaeaf42037f2ca00cf8bd34fec2ddd9c Reviewed-on: https://go-review.googlesource.com/c/go/+/298129 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
Diffstat (limited to 'src/cmd/internal/obj')
0 files changed, 0 insertions, 0 deletions