]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: handle partial type inference that doesn't require function args
authorDan Scales <danscales@google.com>
Mon, 29 Mar 2021 23:07:18 +0000 (16:07 -0700)
committerDan Scales <danscales@google.com>
Tue, 30 Mar 2021 19:44:38 +0000 (19:44 +0000)
commit1318fb4a32371311688c6b868c3041f0501b6aeb
treec109d6aceab1e1373324cfd98e983febd4981262
parent3300390ec70c6b8e2392e4ab32342d426e2d3532
cmd/compile: handle partial type inference that doesn't require function args

Handle the case where types can be partially inferred for an
instantiated function that is not immediately called. The key for the
Inferred map is the CallExpr (if inferring types required the function
arguments) or the IndexExpr (if types could be inferred without the
function arguments).

Added new tests for the case where the function isn't immediately called
to typelist.go.

Change-Id: I60f503ad67cd192da2f2002060229efd4930dc39
Reviewed-on: https://go-review.googlesource.com/c/go/+/305909
Trust: Dan Scales <danscales@google.com>
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Dan Scales <danscales@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
src/cmd/compile/internal/noder/expr.go
test/typeparam/typelist.go