Commit 5bddca64 authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

cmd/compile: minor cleanup in mapinit

Change-Id: I7d58d200f7e8b2c0a6e35371da0dafd9b44e9057
Reviewed-on: https://go-review.googlesource.com/26757
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: 's avatarDavid Crawshaw <crawshaw@golang.org>
Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 41943d96
......@@ -974,13 +974,14 @@ func maplit(ctxt int, n *Node, m *Node, init *Nodes) {
val = temp(m.Type.Val())
}
setlineno(r.Left)
a = Nod(OAS, key, r.Left)
setlineno(index)
a = Nod(OAS, key, index)
a = typecheck(a, Etop)
a = walkstmt(a)
init.Append(a)
setlineno(r.Right)
a = Nod(OAS, val, r.Right)
setlineno(value)
a = Nod(OAS, val, value)
a = typecheck(a, Etop)
a = walkstmt(a)
init.Append(a)
......
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