1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 20:12:21 +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]);
String error;
if ((constant != NULL) && (constant->mTypeCode = BfTypeCode_StringId))
if ((constant != NULL) && (constant->mTypeCode == BfTypeCode_StringId))
{
int stringId = constant->mInt32;
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
//static int gCallIdx = 0;
FixValueActualization(typedVal);
if (typedVal.IsAddr())
return typedVal;
BfType* type = typedVal.mType;