test: Add a test case for derived-tydescs-before-dynamic-allocas
This commit is contained in:
parent
4f13879218
commit
7bb6733f2c
17
src/test/run-pass/alloca-from-derived-tydesc.rs
Normal file
17
src/test/run-pass/alloca-from-derived-tydesc.rs
Normal file
@ -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();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user