mirror of
https://github.com/golang/go
synced 2024-11-19 14:54:43 -07:00
cmd/compile: convert untyped bool for OIF and OFOR
Updates #23834. Change-Id: I92aca9108590a0c7de774f4fad7ded97105e3cb8 Reviewed-on: https://go-review.googlesource.com/94475 Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
9a9a8c0165
commit
e057680542
@ -2027,6 +2027,7 @@ func typecheck1(n *Node, top int) *Node {
|
||||
typecheckslice(n.Ninit.Slice(), Etop)
|
||||
decldepth++
|
||||
n.Left = typecheck(n.Left, Erv)
|
||||
n.Left = defaultlit(n.Left, nil)
|
||||
if n.Left != nil {
|
||||
t := n.Left.Type
|
||||
if t != nil && !t.IsBoolean() {
|
||||
@ -2041,6 +2042,7 @@ func typecheck1(n *Node, top int) *Node {
|
||||
ok |= Etop
|
||||
typecheckslice(n.Ninit.Slice(), Etop)
|
||||
n.Left = typecheck(n.Left, Erv)
|
||||
n.Left = defaultlit(n.Left, nil)
|
||||
if n.Left != nil {
|
||||
t := n.Left.Type
|
||||
if t != nil && !t.IsBoolean() {
|
||||
|
Loading…
Reference in New Issue
Block a user