aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2011-03-07 14:05:16 -0800
committerGraydon Hoare <[email protected]>2011-03-07 14:05:16 -0800
commitabbcc0385dfde85c4254ea0278add7b4c6945885 (patch)
treef864ec462fb129d58582da422c470098af3d5c46 /src/test/run-pass
parentAdd a pretty-printer (diff)
downloadrust-abbcc0385dfde85c4254ea0278add7b4c6945885.tar.xz
rust-abbcc0385dfde85c4254ea0278add7b4c6945885.zip
Poison ty_param values in trans; fix buggy parametric obj and box malloc paths. Add generic-box test.
Diffstat (limited to 'src/test/run-pass')
-rw-r--r--src/test/run-pass/generic-box.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/run-pass/generic-box.rs b/src/test/run-pass/generic-box.rs
new file mode 100644
index 00000000..856f3aff
--- /dev/null
+++ b/src/test/run-pass/generic-box.rs
@@ -0,0 +1,8 @@
+fn box[T](&tup(T,T,T) x) -> @tup(T,T,T) {
+ ret @x;
+}
+
+fn main() {
+ let @tup(int,int,int) x = box[int](tup(1,2,3));
+ check (x._1 == 2);
+} \ No newline at end of file