1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Fixed properties debug evaluation and struct calls

This commit is contained in:
Brian Fiete 2020-09-29 11:58:07 -07:00
parent a399e383fa
commit c28ed988b3
7 changed files with 195 additions and 13 deletions

View file

@ -16291,6 +16291,9 @@ void BfModule::ProcessMethod_SetupParams(BfMethodInstance* methodInstance, BfTyp
auto diType = mBfIRBuilder->DbgGetType(thisPtrType);
if (!thisType->IsValueType())
diType = mBfIRBuilder->DbgCreateArtificialType(diType);
else if (!paramVar->mIsSplat)
diType = mBfIRBuilder->DbgCreatePointerType(diType);
diParams->push_back(diType);
}

View file

@ -690,10 +690,10 @@ int BfMethodInstance::GetStructRetIdx(bool forceStatic)
return 0;
if ((!HasThis()) || (forceStatic))
return 0;
return 0;
if (!owner->IsValueType())
return 1;
if ((mMethodDef->mIsMutating) || ((!AllowsSplatting()) && (!owner->GetLoweredType(BfTypeUsage_Parameter))))
return 1;
if ((mMethodDef->mIsMutating) || (!owner->IsSplattable()) || ((!AllowsThisSplatting()) && (!owner->GetLoweredType(BfTypeUsage_Parameter))))
return 1;
return 0;
}