aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass
diff options
context:
space:
mode:
authorPatrick Walton <[email protected]>2011-02-24 13:51:53 -0800
committerPatrick Walton <[email protected]>2011-02-24 14:24:32 -0800
commitdcd65fac199d3caac4b1019304ef5e1b480f31ff (patch)
tree00f11f18239cafd5a2f5f2efa05febc8389201b6 /src/test/run-pass
parentRevert "Cast more aggressively to the callee type when calling generic functi... (diff)
downloadrust-dcd65fac199d3caac4b1019304ef5e1b480f31ff.tar.xz
rust-dcd65fac199d3caac4b1019304ef5e1b480f31ff.zip
Cast more aggressively to the callee type when calling generic functions. Add a test-case for this, and XFAIL it in rustboot.
Diffstat (limited to 'src/test/run-pass')
-rw-r--r--src/test/run-pass/generic-fn-box.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/run-pass/generic-fn-box.rs b/src/test/run-pass/generic-fn-box.rs
new file mode 100644
index 00000000..e821a784
--- /dev/null
+++ b/src/test/run-pass/generic-fn-box.rs
@@ -0,0 +1,9 @@
+fn f[T](@T x) -> @T {
+ ret x;
+}
+
+fn main() {
+ auto x = f(@3);
+ log *x;
+}
+