1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

cgen: println(none) => <none> (#8404)

This commit is contained in:
Swastik Baranwal 2021-01-29 19:20:48 +05:30 committed by GitHub
parent d7d069adc4
commit c4758c21c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -324,7 +324,7 @@ fn (mut g Gen) gen_expr_to_string(expr ast.Expr, etype table.Type) {
g.expr(expr)
g.write(' ? _SLIT("true") : _SLIT("false")')
} else if sym.kind == .none_ {
g.write('_SLIT("none")')
g.write('_SLIT("<none>")')
} else if sym.kind == .enum_ {
is_var := match expr {
ast.SelectorExpr, ast.Ident { true }