summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-03-13 13:19:30 -0400
committerLeo Tenenbaum <pommicket@gmail.com>2020-03-13 13:19:30 -0400
commit8fd20c574a55b03ac2723e461d5a4890763d7372 (patch)
tree602fa5e79d299dd143ef50a6edc7a53e8c145186 /tests
parentc9ee9b08a9bdf795d0c389a7c42ab61d36a345f4 (diff)
varargs len
Diffstat (limited to 'tests')
-rw-r--r--tests/varargs.toc8
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/varargs.toc b/tests/varargs.toc
index 8709a64..0885da4 100644
--- a/tests/varargs.toc
+++ b/tests/varargs.toc
@@ -6,22 +6,18 @@ tprintf ::= fn(fmt: []char, args: ..) {
sum ::= fn(x: ..) int {
total := 0;
- n := 0;
for a, i := x {
total += a + i - i + 1;
- n += 1;
}
- total - n
+ total - x.len
};
sumc ::= fn(x:: ..) int {
total := 0;
- n := 0;
for a, i := x {
total += a + i - i + 1;
- n += 1;
}
- total - n
+ total - x.len
};
do_printing ::= fn(x::..) {