The %s would not properly print function pointers.

This commit is contained in:
Christoffer Lerno
2025-04-25 11:26:21 +02:00
parent fd2a81afb1
commit 8b29e4780d
3 changed files with 14 additions and 4 deletions

View File

@@ -39,10 +39,11 @@ fn uint128? int_from_any(any arg, bool *is_neg) @private
{
switch (arg.type.kindof)
{
case TypeKind.POINTER:
case FUNC:
case POINTER:
*is_neg = false;
return (uint128)(uptr)*(void**)arg.ptr;
case TypeKind.DISTINCT:
case DISTINCT:
return int_from_any(arg.as_inner(), is_neg);
default:
break;