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

Fixed missing mut error on skipcall

This commit is contained in:
Brian Fiete 2021-02-02 12:23:35 -08:00
parent cb877b1860
commit 9afa24e5d7

View file

@ -8861,7 +8861,19 @@ BfTypedValue BfExprEvaluator::MatchMethod(BfAstNode* targetSrc, BfMethodBoundExp
{
// Just a fake value so we can continue on without generating any code (boxing, conversion, etc)
if (target)
{
if (((target.mType->IsComposite()) || (target.mType->IsTypedPrimitive())))
{
if ((moduleMethodInstance.mMethodInstance->mMethodDef->mIsMutating) &&
((target.IsReadOnly()) || (!target.IsAddr())))
{
String err = StrFormat("call mutating method '%s' on", mModule->MethodToString(moduleMethodInstance.mMethodInstance).c_str());
CheckModifyResult(target, targetSrc, err.c_str());
}
}
callTarget = BfTypedValue(mModule->mBfIRBuilder->GetFakeVal(), targetTypeInst);
}
}
else if (targetTypeInst == callTargetType)
{