Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed Jan 4, 2025
1 parent 53f920f commit 3ff4c0f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vlib/v/checker/assign.v
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ fn (mut c Checker) assign_stmt(mut node ast.AssignStmt) {
c.error('cannot use `<-` on the right-hand side of an assignment, as it does not return any values',
right.pos)
} else if c.inside_recheck {
c.expected_type = node.right_types[i]
if i < node.right_types.len {
c.expected_type = node.right_types[i]
}
mut right_type := c.expr(mut right)
right_type_sym := c.table.sym(right_type)
// fixed array returns an struct, but when assigning it must be the array type
Expand Down

0 comments on commit 3ff4c0f

Please sign in to comment.