mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-11 21:04:10 +02:00
Fixed crash when attempting invocation in const context
This commit is contained in:
parent
e6518a3aab
commit
81af04a1ce
1 changed files with 3 additions and 1 deletions
|
@ -5442,11 +5442,13 @@ BfTypedValue BfExprEvaluator::CreateCall(BfAstNode* targetSrc, const BfTypedValu
|
||||||
|
|
||||||
if ((argValue) && (arg != NULL))
|
if ((argValue) && (arg != NULL))
|
||||||
{
|
{
|
||||||
//
|
if (mModule->mCurMethodState != NULL)
|
||||||
{
|
{
|
||||||
SetAndRestoreValue<BfScopeData*> prevScopeData(mModule->mCurMethodState->mOverrideScope, boxScopeData);
|
SetAndRestoreValue<BfScopeData*> prevScopeData(mModule->mCurMethodState->mOverrideScope, boxScopeData);
|
||||||
argValue = mModule->Cast(arg, argValue, wantType);
|
argValue = mModule->Cast(arg, argValue, wantType);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
argValue = mModule->Cast(arg, argValue, wantType);
|
||||||
|
|
||||||
if (!argValue)
|
if (!argValue)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue