1
0
mirror of https://github.com/golang/go synced 2024-10-05 18:21:21 -06:00

[dev.ssa] cmd/compile/ssa: fix string compilation

Compilation of f_ssa was broken by CL 10929.

This CL does not include tests because
I have a work in progress CL that will catch
this and much more.

package p

func f_ssa() string {
	return "ABC"
}

Change-Id: I0ce0e905e4d30ec206cce808da406b9b7f0f38e9
Reviewed-on: https://go-review.googlesource.com/11136
Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
Josh Bleecher Snyder 2015-06-16 16:16:23 -07:00
parent 50ceef26e6
commit a5c3b6642b

View File

@ -478,7 +478,7 @@ func (s *state) assign(op uint8, left *Node, right *Node) {
t := left.Type
switch {
case t.IsString():
val = s.entryNewValue0(ssa.OpConst, left.Type)
val = s.entryNewValue0A(ssa.OpConst, left.Type, "")
case t.IsInteger():
val = s.entryNewValue0(ssa.OpConst, left.Type)
case t.IsBoolean():