Unique names for polymorphic types

This commit is contained in:
Krzosa Karol
2023-04-01 11:43:26 +02:00
parent b14979d754
commit 9e077d4d88
3 changed files with 32 additions and 24 deletions

View File

@@ -24,9 +24,21 @@ Array :: struct($T: Type)
len: int
cap: int
make_array :: (a: *int, count: int): Array(int)
result := Array(int) {
data = a,
len = count,
cap = count
}
return result
main :: (argc: int, argv: **char): int
array: Array(int)
buff: *int
array: Array(int) = {len = 10, cap = 10, data = buff}
second_array: Array(int)
third_array: Array(int)
fourth: Array(F32)
fifth: Array(F32)
return 0