2012-01-19 16:10:31 -08:00
|
|
|
enum maybe_pointy {
|
2012-01-12 09:28:29 -08:00
|
|
|
none;
|
|
|
|
p(@pointy);
|
|
|
|
}
|
|
|
|
|
|
|
|
type pointy = {
|
|
|
|
mutable a : maybe_pointy,
|
|
|
|
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 @{
|
|
|
|
mutable a : none,
|
|
|
|
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);
|
|
|
|
}
|