mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-15 06:44:10 +02:00
Extra paranoia
This commit is contained in:
parent
e83d9f5bae
commit
22a3b47de2
1 changed files with 6 additions and 2 deletions
|
@ -4330,11 +4330,15 @@ BfTypedValue BfExprEvaluator::LookupIdentifier(BfAstNode* refNode, const StringI
|
||||||
return mModule->GetDefaultTypedValue(mModule->ResolveTypeDef(mModule->mCompiler->mDelegateTypeDef));
|
return mModule->GetDefaultTypedValue(mModule->ResolveTypeDef(mModule->mCompiler->mDelegateTypeDef));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if (!mModule->mCurMethodState->mLocals.IsEmpty())
|
||||||
{
|
{
|
||||||
auto thisLocal = mModule->mCurMethodState->mLocals[0];
|
auto thisLocal = mModule->mCurMethodState->mLocals[0];
|
||||||
|
if (thisLocal->mIsThis)
|
||||||
return BfTypedValue(mModule->mBfIRBuilder->CreateLoad(thisLocal->mAddr), thisLocal->mResolvedType);
|
return BfTypedValue(mModule->mBfIRBuilder->CreateLoad(thisLocal->mAddr), thisLocal->mResolvedType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue