2011-03-25 12:19:20 -07:00
|
|
|
// xfail-stage0
|
2011-05-03 18:13:51 -07:00
|
|
|
// xfail-stage1
|
|
|
|
// xfail-stage2
|
2010-06-23 21:03:09 -07:00
|
|
|
// -*- rust -*-
|
|
|
|
|
2010-07-23 15:29:17 -07:00
|
|
|
// error-pattern: writing to immutable type
|
2010-06-23 21:03:09 -07: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);
|
|
|
|
}
|