aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-08-25 16:21:50 -0700
committerGraydon Hoare <[email protected]>2010-08-25 16:21:50 -0700
commit91d640f90f23a79f10cde0a4e70bd86ab8cf5378 (patch)
tree3150ce55a053e36984eaf51b782b433612f0289a /src/test
parentFirst pass of updating the in-memory layout of closures, for issue 81. (diff)
downloadrust-91d640f90f23a79f10cde0a4e70bd86ab8cf5378.tar.xz
rust-91d640f90f23a79f10cde0a4e70bd86ab8cf5378.zip
Merge obj-drop and closure-drop code, handles freeing bound exteriors now.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/run-pass/bind-exterior.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/run-pass/bind-exterior.rs b/src/test/run-pass/bind-exterior.rs
new file mode 100644
index 00000000..c3fc2e7c
--- /dev/null
+++ b/src/test/run-pass/bind-exterior.rs
@@ -0,0 +1,8 @@
+fn foo(@int a, @int b) -> int {
+ ret a+b;
+}
+
+fn main() {
+ auto f1 = bind foo(@10, @12);
+ check(f1() == 22);
+}