mirror of
https://github.com/golang/go
synced 2024-11-24 12:40:12 -07:00
cmd/compile: remove pointless conversions in copytype
Passes toolstash -cmp. Change-Id: I8b000d4e90e6aa1a0e60bd46fb7cba2ddc1774b5 Reviewed-on: https://go-review.googlesource.com/21210 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
995fb0319e
commit
fcca9d265c
@ -3504,12 +3504,11 @@ func copytype(n *Node, t *Type) {
|
||||
if t.Etype == TFORW {
|
||||
// This type isn't computed yet; when it is, update n.
|
||||
t.Copyto = append(t.Copyto, n)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
maplineno := int(n.Type.Maplineno)
|
||||
embedlineno := int(n.Type.Embedlineno)
|
||||
maplineno := n.Type.Maplineno
|
||||
embedlineno := n.Type.Embedlineno
|
||||
l := n.Type.Copyto
|
||||
|
||||
// TODO(mdempsky): Fix Type rekinding.
|
||||
@ -3537,7 +3536,7 @@ func copytype(n *Node, t *Type) {
|
||||
lno := lineno
|
||||
|
||||
if embedlineno != 0 {
|
||||
lineno = int32(embedlineno)
|
||||
lineno = embedlineno
|
||||
if Isptr[t.Etype] {
|
||||
Yyerror("embedded type cannot be a pointer")
|
||||
}
|
||||
@ -3547,7 +3546,7 @@ func copytype(n *Node, t *Type) {
|
||||
|
||||
// Queue check for map until all the types are done settling.
|
||||
if maplineno != 0 {
|
||||
t.Maplineno = int32(maplineno)
|
||||
t.Maplineno = maplineno
|
||||
mapqueue = append(mapqueue, n)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user