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

Extra paranoia

This commit is contained in:
Brian Fiete 2022-02-15 06:37:04 -05:00
parent e83d9f5bae
commit 22a3b47de2

View file

@ -4331,8 +4331,12 @@ BfTypedValue BfExprEvaluator::LookupIdentifier(BfAstNode* refNode, const StringI
} }
else else
{ {
auto thisLocal = mModule->mCurMethodState->mLocals[0]; if (!mModule->mCurMethodState->mLocals.IsEmpty())
return BfTypedValue(mModule->mBfIRBuilder->CreateLoad(thisLocal->mAddr), thisLocal->mResolvedType); {
auto thisLocal = mModule->mCurMethodState->mLocals[0];
if (thisLocal->mIsThis)
return BfTypedValue(mModule->mBfIRBuilder->CreateLoad(thisLocal->mAddr), thisLocal->mResolvedType);
}
} }
} }