summaryrefslogtreecommitdiff
path: root/test/stdtry.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2014-05-08 14:51:33 -0400
committerOri Bernstein <ori@eigenstate.org>2014-05-08 14:51:33 -0400
commitf1858c72d837e2985995140fad77925515d6205f (patch)
treedfea159eda3765e81ddd55db985541c5aedad0fb /test/stdtry.myr
parent61766f9822581c7f7ed44c66ff975517b350987a (diff)
downloadmc-f1858c72d837e2985995140fad77925515d6205f.tar.gz
Add 'try' to libstd.
This was something I had been thinking about doing, but never did until recently because of a compiler bug. Now it works.
Diffstat (limited to 'test/stdtry.myr')
-rw-r--r--test/stdtry.myr8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/stdtry.myr b/test/stdtry.myr
new file mode 100644
index 0000000..4ec3504
--- /dev/null
+++ b/test/stdtry.myr
@@ -0,0 +1,8 @@
+use std
+
+const main = {
+ var x = `std.Some 123
+ std.try(x)
+ x = `std.None
+ std.try(x)
+}