2010-06-23 23:03:09 -05:00
|
|
|
// -*- rust -*-
|
|
|
|
|
|
|
|
type point = rec(int x, int y, mutable int z);
|
|
|
|
|
2010-06-30 04:30:17 -05:00
|
|
|
fn f(& mutable point p) {
|
2010-06-23 23:03:09 -05:00
|
|
|
p.z = 13;
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let point x = rec(x=10, y=11, z=mutable 12);
|
|
|
|
f(x);
|
|
|
|
check (x.z == 13);
|
|
|
|
}
|