diff --git a/src/test/run-pass/alloca-from-derived-tydesc.rs b/src/test/run-pass/alloca-from-derived-tydesc.rs new file mode 100644 index 00000000000..9b37f368d02 --- /dev/null +++ b/src/test/run-pass/alloca-from-derived-tydesc.rs @@ -0,0 +1,17 @@ +// xfail-stage0 + +tag option[T] { + some(T); + none; +} + +type r[T] = rec(mutable (option[T])[] v); + +fn f[T]() -> T[] { + ret ~[]; +} + +fn main() { + let r[int] r = rec(mutable v=~[]); + r.v = f(); +}