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

@@ -26,7 +26,7 @@ macro slice2d(array_ptr, x = 0, xlen = 0, y = 0, ylen = 0)
if (xlen < 1) xlen = $typeof((*array_ptr)[0]).len + xlen;
if (ylen < 1) ylen = $typeof((*array_ptr)).len + ylen;
var $ElementType = $typeof((*array_ptr)[0][0]);
return Slice2d(<$ElementType>) { ($ElementType*)array_ptr, $typeof((*array_ptr)[0]).len, y, ylen, x, xlen };
return Slice2d<[$ElementType]> { ($ElementType*)array_ptr, $typeof((*array_ptr)[0]).len, y, ylen, x, xlen };
}