Fix regression for parsing types and switch to the "new" generic syntax that's being tested.

This commit is contained in:
Christoffer Lerno
2025-01-26 22:51:27 +01:00
parent 26dc88e096
commit 9530fe8fcd
18 changed files with 83 additions and 57 deletions

View File

@@ -10,10 +10,10 @@ macro insertionsort(list, cmp = EMPTY_MACRO_SLOT, context = EMPTY_MACRO_SLOT) @b
{
$if @typekind(list) == POINTER &&& (@typekind(*list) == ARRAY || @typekind(*list) == VECTOR):
$typeof((*list)[0])[] list2 = list;
is::isort(<$typeof(list2), $typeof(cmp), $typeof(context)>)(list2, 0, list.len, cmp, context);
is::isort<[$typeof(list2), $typeof(cmp), $typeof(context)]>(list2, 0, list.len, cmp, context);
$else
usz len = sort::len_from_list(list);
is::isort(<$typeof(list), $typeof(cmp), $typeof(context)>)(list, 0, (isz)len, cmp, context);
is::isort<[$typeof(list), $typeof(cmp), $typeof(context)]>(list, 0, (isz)len, cmp, context);
$endif
}