aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorRoy Frostig <[email protected]>2010-07-19 18:19:31 -0700
committerRoy Frostig <[email protected]>2010-07-19 18:25:26 -0700
commitfde9ca0937171b77542028ef433fddf979aa506b (patch)
treefcf675dbbca7d865cc05b8cb76683b7de5138e86 /src/test
parentInclude the statements on the LHS of a binop when desugaring. Closes #117. (diff)
downloadrust-fde9ca0937171b77542028ef433fddf979aa506b.tar.xz
rust-fde9ca0937171b77542028ef433fddf979aa506b.zip
Autoderef objects when passing them as implicit (indirect) arg upon vtbl-dispatch. Add testcase and XFAIL it on LLVM. Closes #112.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/run-pass/autoderef-objfn.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/run-pass/autoderef-objfn.rs b/src/test/run-pass/autoderef-objfn.rs
new file mode 100644
index 00000000..ed6f3cc4
--- /dev/null
+++ b/src/test/run-pass/autoderef-objfn.rs
@@ -0,0 +1,16 @@
+// -*- rust -*-
+
+obj clam() {
+ fn chowder() {
+ log "in clam chowder";
+ }
+}
+
+fn foo(@clam c) {
+ c.chowder();
+}
+
+fn main() {
+ let clam c = clam();
+ foo(@c);
+}