mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: consistently use strlit to access constants string values
Passes toolstash-check. Change-Id: Ieaef20b7649787727b69469f93ffc942022bc079 Reviewed-on: https://go-review.googlesource.com/c/go/+/195198 Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
142c002ee7
commit
75da700d0a
7 changed files with 19 additions and 19 deletions
|
|
@ -211,7 +211,7 @@ func (s *InitSchedule) staticassign(l *Node, r *Node) bool {
|
|||
|
||||
case OSTR2BYTES:
|
||||
if l.Class() == PEXTERN && r.Left.Op == OLITERAL {
|
||||
sval := r.Left.Val().U.(string)
|
||||
sval := strlit(r.Left)
|
||||
slicebytes(l, sval, len(sval))
|
||||
return true
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue