mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.typeparams] cmd/compile: deal with inferred type arguments
Create an extra OFUNCINST node as needed, if there are inferred type arguments for a generic function call. Change-Id: Id990c5bcbce2893377072a7e41c7c6785d1eab60 Reviewed-on: https://go-review.googlesource.com/c/go/+/288952 Run-TryBot: Dan Scales <danscales@google.com> TryBot-Result: Go Bot <gobot@golang.org> Trust: Dan Scales <danscales@google.com> Trust: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
parent
e633f343ba
commit
3f845b3b45
2 changed files with 22 additions and 6 deletions
|
|
@ -119,7 +119,7 @@ func Call(pos src.XPos, typ *types.Type, fun ir.Node, args []ir.Node, dots bool)
|
|||
n := ir.NewCallExpr(pos, ir.OCALL, fun, args)
|
||||
n.IsDDD = dots
|
||||
|
||||
if n.X.Op() != ir.OFUNCINST {
|
||||
if fun.Op() != ir.OFUNCINST {
|
||||
// If no type params, still do normal typechecking, since we're
|
||||
// still missing some things done by tcCall below (mainly
|
||||
// typecheckargs and typecheckaste).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue