aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/typecheck/subr.go
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2021-01-24 10:52:00 -0800
committerMatthew Dempsky <mdempsky@google.com>2021-01-25 01:31:37 +0000
commit063c72f06d8673f3a2a03fd549c61935ca3e5cc5 (patch)
tree38600b03f3aa47fa87772e1c7e9c8659fc6a8200 /src/cmd/compile/internal/typecheck/subr.go
parentd05d6fab32cb3d47f8682d19ca11085430f39164 (diff)
downloadgo-063c72f06d8673f3a2a03fd549c61935ca3e5cc5.tar.gz
go-063c72f06d8673f3a2a03fd549c61935ca3e5cc5.zip
[dev.regabi] cmd/compile: backport changes from dev.typeparams (9456804)
This CL backports a bunch of changes that landed on dev.typeparams, but are not dependent on types2 or generics. By backporting, we reduce the divergence between development branches, hopefully improving test coverage and reducing risk of merge conflicts. Updates #43866. Change-Id: I382510855c9b5fac52b17066e44a00bd07fe86f5 Reviewed-on: https://go-review.googlesource.com/c/go/+/286172 Trust: Matthew Dempsky <mdempsky@google.com> Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Robert Griesemer <gri@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/typecheck/subr.go')
-rw-r--r--src/cmd/compile/internal/typecheck/subr.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/cmd/compile/internal/typecheck/subr.go b/src/cmd/compile/internal/typecheck/subr.go
index b6a0870672..b88a9f2283 100644
--- a/src/cmd/compile/internal/typecheck/subr.go
+++ b/src/cmd/compile/internal/typecheck/subr.go
@@ -127,10 +127,9 @@ func NodNil() ir.Node {
return n
}
-// in T.field
-// find missing fields that
-// will give shortest unique addressing.
-// modify the tree with missing type names.
+// AddImplicitDots finds missing fields in obj.field that
+// will give the shortest unique addressing and
+// modifies the tree with missing field names.
func AddImplicitDots(n *ir.SelectorExpr) *ir.SelectorExpr {
n.X = typecheck(n.X, ctxType|ctxExpr)
if n.X.Diag() {