checker: add an early checker error for `node.left_types.len != node.left.len` in assignments

pull/11011/head
Delyan Angelov 2021-07-31 14:57:12 +03:00
parent 9082712e10
commit e374ffb590
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
1 changed files with 3 additions and 0 deletions

View File

@ -4235,6 +4235,9 @@ pub fn (mut c Checker) assign_stmt(mut node ast.AssignStmt) {
}
}
}
if node.left_types.len != node.left.len {
c.error('assign statement left type number mismatch', node.pos)
}
}
fn scope_register_it(mut s ast.Scope, pos token.Position, typ ast.Type) {