summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/pkgtrait.myr13
-rw-r--r--test/tests1
2 files changed, 14 insertions, 0 deletions
diff --git a/test/pkgtrait.myr b/test/pkgtrait.myr
new file mode 100644
index 0000000..7825937
--- /dev/null
+++ b/test/pkgtrait.myr
@@ -0,0 +1,13 @@
+use std
+use regex
+
+impl disposable regex.regex# =
+ __dispose__ = {r
+ regex.free(r)
+ }
+;;
+
+const main = {
+ var auto r : regex.regex#
+ r = std.try(regex.compile(".*"))
+}
diff --git a/test/tests b/test/tests
index 07fffaa..3f8342d 100644
--- a/test/tests
+++ b/test/tests
@@ -86,6 +86,7 @@ B multistr E 0
B generic E 42
B genericval E 42
B trait-builtin E 42
+B pkgtrait E 42
B gtrait P '`std.Before '
B emptytrait E 123
B traitimpl P 246,44,meee