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

MakeAddressable const actualization fix

This commit is contained in:
Brian Fiete 2021-10-22 11:45:59 -07:00
parent baf3b8794b
commit 7cd16974b1

View file

@ -7144,7 +7144,7 @@ BfIRFunction BfModule::GetIntrinsic(BfMethodInstance* methodInstance, bool repor
auto constant = methodOwner->mConstHolder->GetConstant(customAttribute.mCtorArgs[0]); auto constant = methodOwner->mConstHolder->GetConstant(customAttribute.mCtorArgs[0]);
String error; String error;
if ((constant != NULL) && (constant->mTypeCode = BfTypeCode_StringId)) if ((constant != NULL) && (constant->mTypeCode == BfTypeCode_StringId))
{ {
int stringId = constant->mInt32; int stringId = constant->mInt32;
auto entry = mContext->mStringObjectIdMap[stringId]; auto entry = mContext->mStringObjectIdMap[stringId];
@ -12042,7 +12042,7 @@ BfTypedValue BfModule::MakeAddressable(BfTypedValue typedVal, bool forceMutable)
wasReadOnly = true; // Any non-addr is implicitly read-only wasReadOnly = true; // Any non-addr is implicitly read-only
//static int gCallIdx = 0; //static int gCallIdx = 0;
FixValueActualization(typedVal);
if (typedVal.IsAddr()) if (typedVal.IsAddr())
return typedVal; return typedVal;
BfType* type = typedVal.mType; BfType* type = typedVal.mType;