rust/src/test/run-pass/alloca-from-derived-tydesc.rs

8 lines
163 B
Rust
Raw Normal View History

2011-07-27 14:19:39 +02:00
tag option[T] { some(T); none; }
type r[T] = {mutable v: [option<T>]};
fn f[T]() -> [T] { ret ~[]; }
fn main() { let r: r<int> = {mutable v: ~[]}; r.v = f(); }