2010-06-23 21:03:09 -07:00
|
|
|
// -*- rust -*-
|
|
|
|
|
|
|
|
|
|
type point = rec(int x, int y, mutable int z);
|
|
|
|
|
|
2010-11-02 15:24:46 -07:00
|
|
|
impure fn f(& mutable point p) {
|
2010-06-23 21:03:09 -07:00
|
|
|
p.z = 13;
|
|
|
|
|
}
|
|
|
|
|
|
2010-11-02 15:24:46 -07:00
|
|
|
impure fn main() {
|
2010-07-15 15:20:04 -07:00
|
|
|
let point x = rec(x=10, y=11, mutable z=12);
|
2010-06-23 21:03:09 -07:00
|
|
|
f(x);
|
|
|
|
|
check (x.z == 13);
|
|
|
|
|
}
|