Commit fcca9d26 authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

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: default avatarBrad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 995fb031
...@@ -3504,12 +3504,11 @@ func copytype(n *Node, t *Type) { ...@@ -3504,12 +3504,11 @@ func copytype(n *Node, t *Type) {
if t.Etype == TFORW { if t.Etype == TFORW {
// This type isn't computed yet; when it is, update n. // This type isn't computed yet; when it is, update n.
t.Copyto = append(t.Copyto, n) t.Copyto = append(t.Copyto, n)
return return
} }
maplineno := int(n.Type.Maplineno) maplineno := n.Type.Maplineno
embedlineno := int(n.Type.Embedlineno) embedlineno := n.Type.Embedlineno
l := n.Type.Copyto l := n.Type.Copyto
// TODO(mdempsky): Fix Type rekinding. // TODO(mdempsky): Fix Type rekinding.
...@@ -3537,7 +3536,7 @@ func copytype(n *Node, t *Type) { ...@@ -3537,7 +3536,7 @@ func copytype(n *Node, t *Type) {
lno := lineno lno := lineno
if embedlineno != 0 { if embedlineno != 0 {
lineno = int32(embedlineno) lineno = embedlineno
if Isptr[t.Etype] { if Isptr[t.Etype] {
Yyerror("embedded type cannot be a pointer") Yyerror("embedded type cannot be a pointer")
} }
...@@ -3547,7 +3546,7 @@ func copytype(n *Node, t *Type) { ...@@ -3547,7 +3546,7 @@ func copytype(n *Node, t *Type) {
// Queue check for map until all the types are done settling. // Queue check for map until all the types are done settling.
if maplineno != 0 { if maplineno != 0 {
t.Maplineno = int32(maplineno) t.Maplineno = maplineno
mapqueue = append(mapqueue, n) mapqueue = append(mapqueue, n)
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment