mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.typeparams] Parse a generic type arg for generic function call
Will now run "go tool compile -G=2 -W=2" on a simple generic function with one type parameter and a call to that function with one explicit type argument. Next change will handle multiple type arguments. Change-Id: Ia7d17ea2a02bf99bd50e673ac80ae4aad4c48440 Reviewed-on: https://go-review.googlesource.com/c/go/+/288432 Run-TryBot: Dan Scales <danscales@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> Trust: Dan Scales <danscales@google.com>
This commit is contained in:
parent
0aafd69124
commit
13a7412983
4 changed files with 80 additions and 12 deletions
|
|
@ -62,6 +62,7 @@ func check2(noders []*noder) {
|
|||
Selections: make(map[*syntax.SelectorExpr]*types2.Selection),
|
||||
Implicits: make(map[syntax.Node]types2.Object),
|
||||
Scopes: make(map[syntax.Node]*types2.Scope),
|
||||
Inferred: make(map[syntax.Expr]types2.Inferred),
|
||||
// expand as needed
|
||||
}
|
||||
pkg, err := conf.Check(base.Ctxt.Pkgpath, files, &info)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue