mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
assert: print enum value of CTempVars on fail (#10378)
This commit is contained in:
parent
cd464010d4
commit
98cdde8247
@ -88,7 +88,6 @@ fn (mut g Gen) gen_assert_metainfo(node ast.AssertStmt) string {
|
||||
g.write('\t${metaname}.lvalue = ')
|
||||
g.gen_assert_single_expr(node.expr.left, node.expr.left_type)
|
||||
g.writeln(';')
|
||||
//
|
||||
g.write('\t${metaname}.rvalue = ')
|
||||
g.gen_assert_single_expr(node.expr.right, node.expr.right_type)
|
||||
g.writeln(';')
|
||||
|
@ -100,7 +100,7 @@ fn (mut g Gen) gen_expr_to_string(expr ast.Expr, etype ast.Type) {
|
||||
g.write('_SLIT("<none>")')
|
||||
} else if sym.kind == .enum_ {
|
||||
is_var := match expr {
|
||||
ast.SelectorExpr, ast.Ident { true }
|
||||
ast.SelectorExpr, ast.Ident, ast.CTempVar { true }
|
||||
else { false }
|
||||
}
|
||||
if is_var {
|
||||
|
Loading…
Reference in New Issue
Block a user