aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass/generic-bind-2.rs
diff options
context:
space:
mode:
authorBrian Anderson <[email protected]>2011-03-13 19:40:25 -0400
committerBrian Anderson <[email protected]>2011-03-13 19:40:25 -0400
commitbbb6836da003be71744b6e6ea7af1fd4674f8291 (patch)
treefc7780f767666cced8406818806216bee3863c91 /src/test/run-pass/generic-bind-2.rs
parentRemove extra blocks from the translation of expr_block (diff)
parentAdd llvmext/include to the list of include directories to hopefully put out t... (diff)
downloadrust-bbb6836da003be71744b6e6ea7af1fd4674f8291.tar.xz
rust-bbb6836da003be71744b6e6ea7af1fd4674f8291.zip
Merge branch 'master' into recursive-elseif
Conflicts: src/comp/middle/typeck.rs
Diffstat (limited to 'src/test/run-pass/generic-bind-2.rs')
-rw-r--r--src/test/run-pass/generic-bind-2.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/run-pass/generic-bind-2.rs b/src/test/run-pass/generic-bind-2.rs
new file mode 100644
index 00000000..95a8cab4
--- /dev/null
+++ b/src/test/run-pass/generic-bind-2.rs
@@ -0,0 +1,10 @@
+fn id[T](&T t) -> T {
+ ret t;
+}
+
+fn main() {
+ auto t = tup(1,2,3,4,5,6,7);
+ check (t._5 == 6);
+ auto f0 = bind id[tup(int,int,int,int,int,int,int)](t);
+ check (f0()._5 == 6);
+}