1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Fixed tuple ToString with pointer member

This commit is contained in:
Brian Fiete 2025-01-21 08:45:43 -08:00
parent 4054a67ee1
commit 5000fa9843

View file

@ -19188,17 +19188,16 @@ void BfModule::EmitTupleToStringBody()
continue;
BfTypedValue fieldValue = ExtractValue(thisValue, &fieldInstance, fieldInstance.mDataIdx);
if (fieldValue.mType->IsWrappableType())
{
auto wrappedType = GetWrappedStructType(fieldValue.mType);
auto wrappedType = GetWrappedStructType(fieldValue.mType);
if ((wrappedType->IsTypedPrimitive()) || (wrappedType->IsValuelessType()))
{
fieldValue.mType = wrappedType;
}
else
{
fieldValue = MakeAddressable(fieldValue);
fieldValue = MakeAddressable(fieldValue, false, true);
fieldValue.mType = wrappedType;
fieldValue.mValue = mBfIRBuilder->CreateBitCast(fieldValue.mValue, mBfIRBuilder->MapTypeInstPtr(fieldValue.mType->ToTypeInstance()));
if (!wrappedType->IsValuelessType())