about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2011-02-23 18:39:27 -0800
committerPatrick Walton <pcwalton@mimiga.net>2011-02-24 12:33:08 -0800
commit0a65283c5eeae0b98fff7d213dbaad59889e677e (patch)
treeabd9bba82b09433078eda65c62aa0a880763ac8b /src/test
parent127139aecd5c3a1227ee58c77fc083506125f7cd (diff)
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')
-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 00000000000..e821a784598
--- /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;
+}
+