Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed Oct 1, 2024
1 parent 7dc7ca2 commit 0b17659
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions vlib/v/gen/c/infix.v
Original file line number Diff line number Diff line change
Expand Up @@ -840,11 +840,9 @@ fn (mut g Gen) infix_expr_left_shift_op(node ast.InfixExpr) {
tmp_var := g.new_tmp_var()
array_info := left.unaliased_sym.info as ast.Array
noscan := g.check_noscan(array_info.elem_type)
left_dims := g.table.sym(node.left_type).nr_dims()
right_dims := g.table.sym(node.right_type).nr_dims()
if (right.unaliased_sym.kind == .array
|| (right.unaliased_sym.kind == .struct_ && right.unaliased_sym.name == 'array'))
&& left_dims == right_dims && array_info.elem_type != right.typ
&& left.sym.nr_dims() == right.sym.nr_dims() && array_info.elem_type != right.typ
&& !(right.sym.kind == .alias
&& g.table.sumtype_has_variant(array_info.elem_type, node.right_type, false)) {
// push an array => PUSH_MANY, but not if pushing an array to 2d array (`[][]int << []int`)
Expand Down

0 comments on commit 0b17659

Please sign in to comment.