rust/src/test/run-pass/writealias.rs
2010-07-15 15:20:04 -07:00

14 lines
196 B
Rust

// -*- rust -*-
type point = rec(int x, int y, mutable int z);
fn f(& mutable point p) {
p.z = 13;
}
fn main() {
let point x = rec(x=10, y=11, mutable z=12);
f(x);
check (x.z == 13);
}