aboutsummaryrefslogtreecommitdiff
path: root/test/arrays.tm
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-04-06 19:20:07 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-04-06 19:20:07 -0400
commit1d2e55f53dfab5153dbfd0c03f28cd9daedb3b77 (patch)
treeaa1c21191800467abe0b3d16cb6c2a0c2e4587f9 /test/arrays.tm
parentbc93dea8186168aa015b05a615bc1873173393b5 (diff)
Allow uninitialized variables when there's a sensible empty value
(defaults to empty/zero value)
Diffstat (limited to 'test/arrays.tm')
-rw-r--r--test/arrays.tm6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/arrays.tm b/test/arrays.tm
index f2ed2c7a..8122106c 100644
--- a/test/arrays.tm
+++ b/test/arrays.tm
@@ -4,6 +4,10 @@ func main()
= []
do
+ >> nums : [Num32]
+ = []
+
+ do
>> arr := [10, 20, 30]
= [10, 20, 30]
@@ -104,7 +108,7 @@ func main()
>> heap := @[(i * 1337) mod 37 for i in 10]
>> heap.heapify()
>> heap
- heap_order : @[Int] = @[]
+ heap_order : @[Int]
repeat
heap_order.insert(heap.heap_pop() or stop)
>> heap_order[] == heap_order.sorted()