1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Fixed assertion in generic AllowAppend ctor

This commit is contained in:
Brian Fiete 2022-08-03 08:38:04 -07:00
parent 052edbcb8d
commit ca83467e1b

View file

@ -16808,8 +16808,16 @@ BfTypedValue BfModule::CallBaseCtorCalc(bool constOnly)
bindResult.mIRArgs.RemoveAt(0);
calcAppendArgs = bindResult.mIRArgs;
}
BF_ASSERT(calcAppendMethodModule.mFunc);
appendSizeTypedValue = exprEvaluator.CreateCall(NULL, calcAppendMethodModule.mMethodInstance, calcAppendMethodModule.mFunc, false, calcAppendArgs);
if (mBfIRBuilder->mIgnoreWrites)
{
appendSizeTypedValue = GetFakeTypedValue(GetPrimitiveType(BfTypeCode_IntPtr));
}
else
{
BF_ASSERT(calcAppendMethodModule.mFunc);
appendSizeTypedValue = exprEvaluator.CreateCall(NULL, calcAppendMethodModule.mMethodInstance, calcAppendMethodModule.mFunc, false, calcAppendArgs);
}
BF_ASSERT(appendSizeTypedValue.mType == GetPrimitiveType(BfTypeCode_IntPtr));
return appendSizeTypedValue;