2012-01-19 16:10:31 -08:00
|
|
|
enum maybe_pointy {
|
2012-01-19 18:31:08 -08:00
|
|
|
none,
|
|
|
|
p(@pointy),
|
2012-01-12 09:28:29 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
type pointy = {
|
2012-03-26 18:35:18 -07:00
|
|
|
mut a : maybe_pointy,
|
2012-01-12 09:28:29 -08:00
|
|
|
c : ~int,
|
2012-01-12 12:31:45 -08:00
|
|
|
d : fn~()->(),
|
2012-01-12 09:28:29 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
fn empty_pointy() -> @pointy {
|
|
|
|
ret @{
|
2012-03-26 18:35:18 -07:00
|
|
|
mut a : none,
|
2012-01-12 09:28:29 -08:00
|
|
|
c : ~22,
|
2012-01-12 12:31:45 -08:00
|
|
|
d : fn~()->(){},
|
2012-01-12 09:28:29 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main()
|
|
|
|
{
|
|
|
|
let v = empty_pointy();
|
|
|
|
v.a = p(v);
|
|
|
|
}
|