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

pull/8421/head
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
1 changed files with 1 additions and 1 deletions

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 }