2011-03-25 14:19:20 -05:00
|
|
|
// xfail-stage0
|
2010-06-23 23:03:09 -05:00
|
|
|
// -*- rust -*-
|
|
|
|
|
2011-06-15 05:17:37 -05:00
|
|
|
// error-pattern:assignment to immutable field
|
2010-06-23 23:03:09 -05:00
|
|
|
|
|
|
|
type point = rec(int x, int y, int z);
|
|
|
|
|
|
|
|
fn f(&point p) {
|
|
|
|
p.x = 13;
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let point x = rec(x=10, y=11, z=12);
|
|
|
|
f(x);
|
|
|
|
}
|