summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-09-27 02:29:24 -0700
committerOri Bernstein <ori@eigenstate.org>2015-09-27 03:10:27 -0700
commit056ef88fc6d281ae626ddf2c598afe2abdb06888 (patch)
tree365360a966fd895ac3c2b117c1e2a6fce4f23730 /test
parentcde7e0d999cf3d56f48d830cf3149f779d86fb31 (diff)
downloadmc-056ef88fc6d281ae626ddf2c598afe2abdb06888.tar.gz
Working closures.
Diffstat (limited to 'test')
-rw-r--r--test/closure.myr4
-rw-r--r--test/tests2
2 files changed, 4 insertions, 2 deletions
diff --git a/test/closure.myr b/test/closure.myr
index 7788244..c7089d3 100644
--- a/test/closure.myr
+++ b/test/closure.myr
@@ -1,8 +1,10 @@
+use std
+
/* checks that functions with environment capture work. should exit with 42. */
const main = {
var a = 42
var f = {b
-> a + b
}
- f(13)
+ std.exit(f(13))
}
diff --git a/test/tests b/test/tests
index 7fa4733..c93d373 100644
--- a/test/tests
+++ b/test/tests
@@ -58,7 +58,7 @@ B voidcall E 12
B callbig E 42
B nestfn E 42
B foldidx P 123,456
-# B closure E 55 ## BUGGERED
+B closure E 55
B loop P 0123401236789
B subrangefor P 12
B patiter P 23512