]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.typeparams] cmd/compile: fix getDictionarySym for methods references, write...
authorDan Scales <danscales@google.com>
Wed, 30 Jun 2021 22:38:56 +0000 (15:38 -0700)
committerDan Scales <danscales@google.com>
Thu, 1 Jul 2021 17:35:29 +0000 (17:35 +0000)
commit9ba294e15bf09636ce3069ad577d8411c9730504
treea65178a5a0f2dfd3d763cf9857aef548c750ebc5
parent0e0b80cb56ba3bd2128417d9368b4e74b1e45d95
[dev.typeparams] cmd/compile: fix getDictionarySym for methods references, write out sub-dictionaries

For method references (only), selectorExpr() now computes n.Selection,
which is the generic method that is selected. This allows us to compute
as needed the proper sub-dictionary for method reference. Also cleans up
some code for distinguishing method references from references to a
field that has a function value (especially in the presence of embedded
fields).

Change-Id: I9c5b789c15537ff48c70ca7a6444aa0420178a3a
Reviewed-on: https://go-review.googlesource.com/c/go/+/332095
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Dan Scales <danscales@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/noder/expr.go
src/cmd/compile/internal/noder/stencil.go
src/cmd/compile/internal/noder/types.go