From 63ea50be35afb6d7b9dbcd20fe3c31de6187858e Mon Sep 17 00:00:00 2001 From: Leo Tenenbaum Date: Mon, 16 Mar 2020 20:55:18 -0400 Subject: updated tests, fixed bugs --- tests/arr.toc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/arr.toc') diff --git a/tests/arr.toc b/tests/arr.toc index eee514a..5fb8328 100644 --- a/tests/arr.toc +++ b/tests/arr.toc @@ -1,3 +1,4 @@ +#include "mem.toc"; puti ::= fn(x: int) { //tcc's giving me "incompatible types for redefinition of 'printf'" for some reason (even though the declarations have the exact same type) #C("#ifndef __TINYC__ @@ -25,7 +26,7 @@ Arr ::= fn (t :: Type) Type { arr_add ::= fn(t :: Type, a : &Arr(t), x : t) { if a.len >= a.cap { a.cap = a.cap * 2 + 2; - new_data := new(t, a.cap); + new_data := news(t, a.cap); for i := 0..a.len-1 { new_data[i] = a.data[i]; } -- cgit v1.2.3