2011-07-27 07:19:39 -05:00
|
|
|
tag option[T] { some(T); none; }
|
2011-06-18 20:44:21 -05:00
|
|
|
|
2011-07-27 07:19:39 -05:00
|
|
|
type r[T] = {mutable v: (option[T])[]};
|
2011-06-18 20:44:21 -05:00
|
|
|
|
2011-07-18 10:41:35 -05:00
|
|
|
fn f[T]() -> [T] { ret ~[]; }
|
2011-06-18 20:44:21 -05:00
|
|
|
|
2011-07-18 10:41:35 -05:00
|
|
|
fn main() { let r: r[int] = {mutable v: ~[]}; r.v = f(); }
|