mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
go/types, types2: rename structuralType/String to coreType/String
This is a pure rename of the respective Go functions/methods with corresponding adjustments to error messages and tests. A couple of comments were manually rephrased. With this change, the implementation and error messages match the latest spec. No functionality change. Change-Id: Iaa92a08b64756356fb2c5abdaca5c943c9105c96 Reviewed-on: https://go-review.googlesource.com/c/go/+/384618 Trust: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
This commit is contained in:
parent
ea3c546e9e
commit
2bf5ae0c28
39 changed files with 136 additions and 134 deletions
|
|
@ -332,13 +332,13 @@ func (g *irgen) exprs(exprs []syntax.Expr) []ir.Node {
|
|||
}
|
||||
|
||||
func (g *irgen) compLit(typ types2.Type, lit *syntax.CompositeLit) ir.Node {
|
||||
if ptr, ok := types2.StructuralType(typ).(*types2.Pointer); ok {
|
||||
if ptr, ok := types2.CoreType(typ).(*types2.Pointer); ok {
|
||||
n := ir.NewAddrExpr(g.pos(lit), g.compLit(ptr.Elem(), lit))
|
||||
n.SetOp(ir.OPTRLIT)
|
||||
return typed(g.typ(typ), n)
|
||||
}
|
||||
|
||||
_, isStruct := types2.StructuralType(typ).(*types2.Struct)
|
||||
_, isStruct := types2.CoreType(typ).(*types2.Struct)
|
||||
|
||||
exprs := make([]ir.Node, len(lit.ElemList))
|
||||
for i, elem := range lit.ElemList {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue