String works with printf. Example cleanup.

This commit is contained in:
Christoffer Lerno
2022-07-26 01:15:36 +02:00
parent cdff5c3e26
commit 4471ccff13
7 changed files with 29 additions and 24 deletions

View File

@@ -69,6 +69,10 @@ private fn void! out_str(PrintParam* param, variant arg)
case FAILABLE:
unreachable();
case DISTINCT:
if (arg.type == String.typeid)
{
return out_substr(param, ((String*)arg).str());
}
return out_str(param, variant { arg.ptr, arg.type.inner });
case POINTER:
typeid inner = arg.type.inner;