mirror of
https://github.com/golang/go
synced 2024-11-17 18:24:45 -07:00
go/internal/gcimporter,cmd/compile: minor clean-up in iimport.go
Make two superficial fixes to iimport.go: rename instType to instanceType (suggested in CL 349949), and fix a stale comment. Done in both go/internal/gcimporter and cmd/compile/internal/importer. Change-Id: Idfdda11a59b036a35824bbb1c101cba3652aeff4 Reviewed-on: https://go-review.googlesource.com/c/go/+/350031 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
4847c47cb8
commit
e4dfd788e6
@ -72,7 +72,7 @@ const (
|
|||||||
structType
|
structType
|
||||||
interfaceType
|
interfaceType
|
||||||
typeParamType
|
typeParamType
|
||||||
instType
|
instanceType
|
||||||
unionType
|
unionType
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -646,7 +646,7 @@ func (r *importReader) doType(base *types2.Named) types2.Type {
|
|||||||
r.p.doDecl(pkg, name)
|
r.p.doDecl(pkg, name)
|
||||||
return r.p.tparamIndex[id]
|
return r.p.tparamIndex[id]
|
||||||
|
|
||||||
case instType:
|
case instanceType:
|
||||||
if r.p.exportVersion < iexportVersionGenerics {
|
if r.p.exportVersion < iexportVersionGenerics {
|
||||||
errorf("unexpected instantiation type")
|
errorf("unexpected instantiation type")
|
||||||
}
|
}
|
||||||
@ -661,7 +661,7 @@ func (r *importReader) doType(base *types2.Named) types2.Type {
|
|||||||
baseType := r.typ()
|
baseType := r.typ()
|
||||||
// The imported instantiated type doesn't include any methods, so
|
// The imported instantiated type doesn't include any methods, so
|
||||||
// we must always use the methods of the base (orig) type.
|
// we must always use the methods of the base (orig) type.
|
||||||
// TODO provide a non-nil *Checker
|
// TODO provide a non-nil *Environment
|
||||||
t, _ := types2.Instantiate(nil, baseType, targs, false)
|
t, _ := types2.Instantiate(nil, baseType, targs, false)
|
||||||
return t
|
return t
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ const (
|
|||||||
structType
|
structType
|
||||||
interfaceType
|
interfaceType
|
||||||
typeParamType
|
typeParamType
|
||||||
instType
|
instanceType
|
||||||
unionType
|
unionType
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -638,7 +638,7 @@ func (r *importReader) doType(base *types.Named) types.Type {
|
|||||||
r.p.doDecl(pkg, name)
|
r.p.doDecl(pkg, name)
|
||||||
return r.p.tparamIndex[id]
|
return r.p.tparamIndex[id]
|
||||||
|
|
||||||
case instType:
|
case instanceType:
|
||||||
if r.p.exportVersion < iexportVersionGenerics {
|
if r.p.exportVersion < iexportVersionGenerics {
|
||||||
errorf("unexpected instantiation type")
|
errorf("unexpected instantiation type")
|
||||||
}
|
}
|
||||||
@ -653,7 +653,7 @@ func (r *importReader) doType(base *types.Named) types.Type {
|
|||||||
baseType := r.typ()
|
baseType := r.typ()
|
||||||
// The imported instantiated type doesn't include any methods, so
|
// The imported instantiated type doesn't include any methods, so
|
||||||
// we must always use the methods of the base (orig) type.
|
// we must always use the methods of the base (orig) type.
|
||||||
// TODO provide a non-nil *Checker
|
// TODO provide a non-nil *Environment
|
||||||
t, _ := types.Instantiate(nil, baseType, targs, false)
|
t, _ := types.Instantiate(nil, baseType, targs, false)
|
||||||
return t
|
return t
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user