2012-01-19 16:10:31 -08:00
|
|
|
enum maybe_pointy {
|
2012-01-19 18:31:08 -08:00
|
|
|
no_pointy,
|
|
|
|
yes_pointy(@pointy),
|
2011-09-26 23:24:53 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
type pointy = {
|
2012-03-26 18:35:18 -07:00
|
|
|
mut x : maybe_pointy
|
2011-09-26 23:24:53 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
fn main() {
|
2012-03-26 18:35:18 -07:00
|
|
|
let m = @{ mut x : no_pointy };
|
2011-09-26 23:24:53 -07:00
|
|
|
m.x = yes_pointy(m);
|
|
|
|
}
|