mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: encapsulate map value type
Passes toolstash -cmp. Change-Id: I83af544974e1e91e0810e13321afb3e665dcdf12 Reviewed-on: https://go-review.googlesource.com/21248 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
bf5f24b98e
commit
093a9a1f56
10 changed files with 40 additions and 33 deletions
|
|
@ -860,7 +860,7 @@ func maplit(ctxt int, n *Node, var_ *Node, init *Nodes) {
|
|||
// build type [count]struct { a Tindex, b Tvalue }
|
||||
t := n.Type
|
||||
tk := t.Key()
|
||||
tv := t.Type
|
||||
tv := t.Val()
|
||||
|
||||
syma := Lookup("a")
|
||||
symb := Lookup("b")
|
||||
|
|
@ -969,7 +969,7 @@ func maplit(ctxt int, n *Node, var_ *Node, init *Nodes) {
|
|||
// use temporary so that mapassign1 can have addressable key, val.
|
||||
if key == nil {
|
||||
key = temp(var_.Type.Key())
|
||||
val = temp(var_.Type.Type)
|
||||
val = temp(var_.Type.Val())
|
||||
}
|
||||
|
||||
setlineno(r.Left)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue