summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndrew Chambers <andrewchamberss@gmail.com>2016-02-06 11:20:55 +1300
committerAndrew Chambers <andrewchamberss@gmail.com>2016-02-06 11:21:15 +1300
commit932320f93ec0266a53c3e50600d73d3d23e1db76 (patch)
tree0d106dc6f3064b022fcda0c9e0fbb6ae14d11df4 /test
parent3c1277e37fbaea87d770d4a64a5029c4a693bb63 (diff)
downloadmc-932320f93ec0266a53c3e50600d73d3d23e1db76.tar.gz
fix rval len, fixes #69
Diffstat (limited to 'test')
-rw-r--r--test/rvaldotlen.myr21
-rw-r--r--test/tests1
2 files changed, 22 insertions, 0 deletions
diff --git a/test/rvaldotlen.myr b/test/rvaldotlen.myr
new file mode 100644
index 0000000..2c87f95
--- /dev/null
+++ b/test/rvaldotlen.myr
@@ -0,0 +1,21 @@
+use std
+
+const f1 = { -> byte[:]
+ -> [1, 2, 3][:]
+}
+
+const f2 = { -> byte[3]
+ -> [1, 2, 3]
+}
+
+
+const main = {
+ if f1().len != 3
+ -> void
+ ;;
+ if f2().len != 3
+ -> void
+ ;;
+ std.put("pass\n")
+}
+
diff --git a/test/tests b/test/tests
index 4ed8cdd..0439482 100644
--- a/test/tests
+++ b/test/tests
@@ -154,3 +154,4 @@ F badop
B voideffect P pass
B foroptexpr P pass
B bounds E 134
+B rvaldotlen P pass