mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: add OSLICELIT
Does not pass toolstash -cmp due to changed export data, but the cmd/go binary (which doesn't contain export data) is bit-for-bit identical. Change-Id: I6b12f9de18cf7da528e9207dccbf8f08c969f142 Reviewed-on: https://go-review.googlesource.com/26753 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
parent
41e1c42028
commit
49cce1a62e
14 changed files with 114 additions and 128 deletions
|
|
@ -1397,7 +1397,7 @@ func safeexpr(n *Node, init *Nodes) *Node {
|
|||
a = walkexpr(a, init)
|
||||
return a
|
||||
|
||||
case OSTRUCTLIT, OARRAYLIT:
|
||||
case OSTRUCTLIT, OARRAYLIT, OSLICELIT:
|
||||
if isStaticCompositeLiteral(n) {
|
||||
return n
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue