Skip to content

Commit ec80918

Browse files
msullivanbrson
authored andcommitted
Add a test written by jdm that tests repeated vector self appending.
1 parent 8ad7f3b commit ec80918

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/test/run-pass/vec-self-append.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// xfail-stage0
2+
3+
fn main()
4+
{
5+
// Make sure we properly handle repeated self-appends.
6+
let vec[int] a = [0];
7+
auto i = 20;
8+
while (i > 0) {
9+
a += a;
10+
i -= 1;
11+
}
12+
}

0 commit comments

Comments
 (0)