mirror of
https://github.com/golang/go
synced 2024-11-11 23:10:23 -07:00
go/internal/gcimporter: always call SetTParams, even if empty
This resolves an outstanding TODO to be consistent about calling SetTParams. Done in both go/internal/gcimporter and cmd/compile/internal/importer. Change-Id: Ief642efe016f02bab1bab960f6731a0ac0a8ad28 Reviewed-on: https://go-review.googlesource.com/c/go/+/347389 Trust: Robert Findley <rfindley@google.com> Run-TryBot: Robert Findley <rfindley@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
parent
d01388b04f
commit
08588e6036
@ -327,9 +327,7 @@ func (r *importReader) obj(name string) {
|
||||
// declaration before recursing.
|
||||
obj := types2.NewTypeName(pos, r.currPkg, name, nil)
|
||||
named := types2.NewNamed(obj, nil, nil)
|
||||
if tag == 'U' {
|
||||
named.SetTParams(tparams)
|
||||
}
|
||||
named.SetTParams(tparams)
|
||||
r.declare(obj)
|
||||
|
||||
underlying := r.p.typAt(r.uint64(), named).Underlying()
|
||||
|
@ -317,10 +317,7 @@ func (r *importReader) obj(name string) {
|
||||
// declaration before recursing.
|
||||
obj := types.NewTypeName(pos, r.currPkg, name, nil)
|
||||
named := types.NewNamed(obj, nil, nil)
|
||||
// TODO(rfindley): guarding on tag == 'U' should not be necessary here.
|
||||
if tag == 'U' {
|
||||
named.SetTParams(tparams)
|
||||
}
|
||||
named.SetTParams(tparams)
|
||||
r.declare(obj)
|
||||
|
||||
underlying := r.p.typAt(r.uint64(), named).Underlying()
|
||||
|
Loading…
Reference in New Issue
Block a user