Closed
Description
Each pair of lines in the following function:
fn main() {
let vec[int] v = vec(1, 2, 3);
v.(1) = 4;
let tup(int) t = tup(1);
t._0 = 5;
let rec(int x) r = rec(x=1);
r.x = 6;
}
shouldn't make it past the typechecking phase, but do. Also, the following object definition makes it past the typechecker:
obj objy(int x) {
fn foo() -> () {
x = 5;
}
}
but should not. Fix the typechecker to disallow writing to immutable type-parts.