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

Fixed crash when attempting invocation in const context

This commit is contained in:
Brian Fiete 2020-03-02 08:07:11 -08:00
parent e6518a3aab
commit 81af04a1ce

View file

@ -5442,11 +5442,13 @@ BfTypedValue BfExprEvaluator::CreateCall(BfAstNode* targetSrc, const BfTypedValu
if ((argValue) && (arg != NULL))
{
//
if (mModule->mCurMethodState != NULL)
{
SetAndRestoreValue<BfScopeData*> prevScopeData(mModule->mCurMethodState->mOverrideScope, boxScopeData);
argValue = mModule->Cast(arg, argValue, wantType);
}
else
argValue = mModule->Cast(arg, argValue, wantType);
if (!argValue)
{