Have cgen convert "ok" to "NULL"

This commit is contained in:
Nigel Tao committed 2018-11-24 15:20:44 +11:00
1 parent fcffb9676e
commit 5a43e931f9
1 file changed
+1 -1
+1 -1
View File
@@ -44,7 +44,7 @@ func (g *gen) writeExpr(b *buffer, n *a.Expr, rp replacementPolicy, depth uint32
if cv := n.ConstValue(); cv != nil {
if typ := n.MType(); typ.IsNumTypeOrIdeal() {
b.writes(cv.String())
} else if typ.IsNullptr() {
} else if typ.IsNullptr() || typ.IsStatus() {
b.writes("NULL")
} else if cv.Cmp(zero) == 0 {
b.writes("false")