Open
Description
- Programs like
let x = {};
,let x = { 2; }
where assigned to blk with no last expr, should either be rejected or accepted but runtime must change to allow this (assignment to unit is allowed in Rust) - Currently if blk decls have any errors, those are thrown first without checking last expr because last expr might depend on decls.
e.g
let x : int = true;
let y = 20;
{
let y : bool = 20;
}
x + false
x+false is the last expr, add is not allowed for bool but type checker won't throw this until prev errors are fixed.
- Need more advanced control flow analysis to see what the last expr depends on (probably after 4215 over)
Metadata
Metadata
Assignees
Labels
No labels