aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass/vec-alloc-append.rs
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-07-15 18:57:21 -0700
committerGraydon Hoare <[email protected]>2010-07-15 18:57:21 -0700
commitf300ca4ed7dd967b43c965417a8091dbc444cb82 (patch)
tree9f76b2c5864117abf20cefa4d5a9ec27d3088fd2 /src/test/run-pass/vec-alloc-append.rs
parentImplement the "simple typechecker", which avoids HM inference (diff)
downloadrust-f300ca4ed7dd967b43c965417a8091dbc444cb82.tar.xz
rust-f300ca4ed7dd967b43c965417a8091dbc444cb82.zip
XFAIL the new destructor tests; collided with new typechecker; add test for issue #109.
Diffstat (limited to 'src/test/run-pass/vec-alloc-append.rs')
-rw-r--r--src/test/run-pass/vec-alloc-append.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/run-pass/vec-alloc-append.rs b/src/test/run-pass/vec-alloc-append.rs
new file mode 100644
index 00000000..2b4a2b20
--- /dev/null
+++ b/src/test/run-pass/vec-alloc-append.rs
@@ -0,0 +1,12 @@
+// This is a test for issue #109.
+
+use std;
+
+fn slice[T](vec[T] e) {
+ let vec[T] result = std._vec.alloc[T](uint(1));
+ result += e;
+}
+
+fn main() {
+ slice[str](vec("a"));
+}