1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

Fixed comptime type ToString

This commit is contained in:
Brian Fiete 2025-01-14 10:44:58 -08:00
parent e30972d3af
commit f96e231d7b

View file

@ -6240,9 +6240,16 @@ bool CeContext::Execute(CeFunction* startFunction, uint8* startStackPtr, uint8*
SetAndRestoreValue<BfMethodInstance*> prevMethodInstance(mCeMachine->mCeModule->mCurMethodInstance, mCallerMethodInstance);
SetAndRestoreValue<BfTypeInstance*> prevTypeInstance(mCeMachine->mCeModule->mCurTypeInstance, mCallerTypeInstance);
bool simpleName = false;
if ((type->IsUnspecializedType()) && (!type->IsUnspecializedTypeVariation()) && (!type->IsGenericParam()))
simpleName = true;
String typeName;
mCeMachine->mCeModule->DoTypeToString(typeName, type, BfTypeNameFlags_None);
if (simpleName)
mCeMachine->mCeModule->DoTypeToString(typeName, type, BfTypeNameFlags_None);
else
typeName = mCeMachine->mCeModule->TypeToString(type);
CeSetAddrVal(stackPtr + 0, GetString(typeName), ptrSize);
_FixVariables();
}