1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

checker: small fix in assign_stmt

This commit is contained in:
joe-conigliaro 2020-05-02 20:21:28 +10:00
parent fd925fbd05
commit a9a8539e41
No known key found for this signature in database
GPG Key ID: C12F7136C08206F1

View File

@ -1024,7 +1024,7 @@ pub fn (mut c Checker) assign_stmt(assign_stmt mut ast.AssignStmt) {
right_type0 := c.expr(assign_stmt.right[0])
assign_stmt.right_types = [right_type0]
right_type_sym0 := c.table.get_type_symbol(right_type0)
mut right_len := if right_type0 == table.void_type { 0 } else { 1 }
mut right_len := if right_type0 == table.void_type { 0 } else { assign_stmt.right.len }
if right_type_sym0.kind == .multi_return {
assign_stmt.right_types = right_type_sym0.mr_info().types
right_len = assign_stmt.right_types.len