Baby steps struct polymorphs
This commit is contained in:
@@ -5,11 +5,6 @@ PushStruct :: (a: *MA.Arena, $T: Type): *$T
|
||||
result := PushSize(a, size)
|
||||
return result
|
||||
|
||||
Array :: struct($T: Type)
|
||||
data: *T
|
||||
len: int
|
||||
cap: int
|
||||
|
||||
Array(int)
|
||||
|
||||
QueueAddSLL(list: $List, node: $Node, first: #Identifier = first, last: #Identifier = last, next: #Identifier = next)
|
||||
@@ -24,6 +19,10 @@ QueueAddSLL(list: $List, node: $Node, $first = first, $last = last, $next = next
|
||||
|
||||
*/
|
||||
|
||||
Array :: struct($T: Type)
|
||||
data: *T
|
||||
len: int
|
||||
cap: int
|
||||
|
||||
main :: (argc: int, argv: **char): int
|
||||
$i := 10
|
||||
return 0
|
||||
Reference in New Issue
Block a user