Commit 0fd6df35 authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

cmd/compile: simplify printing of constant bools

Change-Id: I9339e83e39075826bf5819e55804a94208fe84ae
Reviewed-on: https://go-review.googlesource.com/38140
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent ec091b6a
...@@ -433,11 +433,7 @@ func (v Val) vconv(s fmt.State, flag FmtFlag) { ...@@ -433,11 +433,7 @@ func (v Val) vconv(s fmt.State, flag FmtFlag) {
fmt.Fprint(s, strconv.Quote(u)) fmt.Fprint(s, strconv.Quote(u))
case bool: case bool:
t := "false" fmt.Fprint(s, u)
if u {
t = "true"
}
fmt.Fprint(s, t)
case *NilVal: case *NilVal:
fmt.Fprint(s, "nil") fmt.Fprint(s, "nil")
......
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