From 3f480a358e8d976571c995194a67464a3f70ca64 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Wed, 8 Apr 2020 22:34:14 +0200 Subject: [PATCH] fix type_alias test --- vlib/v/gen/cgen.v | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vlib/v/gen/cgen.v b/vlib/v/gen/cgen.v index aaa95523b5..6a49bf60b2 100644 --- a/vlib/v/gen/cgen.v +++ b/vlib/v/gen/cgen.v @@ -1414,7 +1414,9 @@ fn (g mut Gen) infix_expr(node ast.InfixExpr) { g.write(',') g.expr(node.right) g.write(')') - } else if node.op in [.plus, .minus, .mul, .div] && (left_sym.name[0].is_capital() || left_sym.name.contains('.')) { + } else if node.op in [.plus, .minus, .mul, .div] && (left_sym.name[0].is_capital() || left_sym.name.contains('.')) && + left_sym.kind != .alias { + // !left_sym.is_number() { g.write(g.typ(node.left_type)) g.write('_') g.write(util.replace_op(node.op.str()))