2012-01-12 11:28:29 -06:00
|
|
|
tag maybe_pointy {
|
|
|
|
none;
|
|
|
|
p(@pointy);
|
|
|
|
}
|
|
|
|
|
|
|
|
type pointy = {
|
|
|
|
mutable a : maybe_pointy,
|
|
|
|
c : ~int,
|
2012-01-12 14:31:45 -06:00
|
|
|
d : fn~()->(),
|
2012-01-12 11:28:29 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
fn empty_pointy() -> @pointy {
|
|
|
|
ret @{
|
|
|
|
mutable a : none,
|
|
|
|
c : ~22,
|
2012-01-12 14:31:45 -06:00
|
|
|
d : fn~()->(){},
|
2012-01-12 11:28:29 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main()
|
|
|
|
{
|
|
|
|
let v = empty_pointy();
|
|
|
|
v.a = p(v);
|
|
|
|
}
|