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

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

This commit is contained in:
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

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) {