summaryrefslogtreecommitdiff
path: root/test.toc
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2019-10-20 21:54:12 -0400
committerLeo Tenenbaum <pommicket@gmail.com>2019-10-20 21:54:12 -0400
commite6893fe38972d2869042413a70601e6e40e0c6ab (patch)
treec41a6316b7f39b65077253e247907357a55e656d /test.toc
parent1da7e2ba082c491ea63d518b67b45d31f64f3fec (diff)
mostly fixed compile time new
Diffstat (limited to 'test.toc')
-rw-r--r--test.toc16
1 files changed, 10 insertions, 6 deletions
diff --git a/test.toc b/test.toc
index 8b5c7fc..70c5bd6 100644
--- a/test.toc
+++ b/test.toc
@@ -6,13 +6,16 @@
// };
foo @= fn() int {
- // X := new([100]int);
- i := 0;
- while i < 100 {
+ X := new([100]int,5);
+ asdf : [100]int;
+ (*(&asdf))[5] = 12;
+
+
+ // i := 0;
+ // while i < 100 {
// (*X)[i] = i;
- i = i + 1;
- }
- i
+ // i = i + 1;
+ // }
// total := 0;
// i = 0;
// while i < 100 {
@@ -20,6 +23,7 @@ foo @= fn() int {
// i = i + 1;
// }
// total
+ asdf[5]
};
main @= fn() {