[dev.typeparams] cmd/compile: port CL 330838 for -G=3

So next CL can move MethodValueWrapper to walk, since when walk is now
the only place which uses this function.

Change-Id: Id3be359bfc38efb022451cb7f9e53c2868fe7e12
Reviewed-on: https://go-review.googlesource.com/c/go/+/330840
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
Cuong Manh Le 2021-06-27 22:10:03 +07:00
parent 20a04f6041
commit a8861b907d

View file

@ -594,7 +594,7 @@ func transformDot(n *ir.SelectorExpr, isCall bool) ir.Node {
// Or did we successfully desugar all that at stencil time?
return n
}
n.SetType(typecheck.MethodValueWrapper(n).Type())
n.SetType(typecheck.NewMethodType(n.Type(), nil))
}
return n
}