aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass/vec-alloc-append.rs
blob: 4327e789cd5724a850ac40cf0167b64b66e46d2b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// xfail-stage0
// xfail-stage1
// xfail-stage2
// This is a test for issue #109.

use std;

fn slice[T](vec[T] e) {
  let vec[T] result = std.Vec.alloc[T](1 as uint);
  log "alloced";
  result += e;
  log "appended";
}

fn main() {
  slice[str](vec("a"));
}