mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Fixed @this crash
This commit is contained in:
parent
381c629a03
commit
86e32fbd67
1 changed files with 6 additions and 1 deletions
|
@ -4982,7 +4982,12 @@ BfTypedValue BfExprEvaluator::LookupIdentifier(BfAstNode* refNode, const StringI
|
||||||
{
|
{
|
||||||
auto thisLocal = mModule->mCurMethodState->mLocals[0];
|
auto thisLocal = mModule->mCurMethodState->mLocals[0];
|
||||||
if (thisLocal->mIsThis)
|
if (thisLocal->mIsThis)
|
||||||
|
{
|
||||||
|
if (thisLocal->mAddr)
|
||||||
return BfTypedValue(mModule->mBfIRBuilder->CreateLoad(thisLocal->mAddr), thisLocal->mResolvedType);
|
return BfTypedValue(mModule->mBfIRBuilder->CreateLoad(thisLocal->mAddr), thisLocal->mResolvedType);
|
||||||
|
else
|
||||||
|
return BfTypedValue(thisLocal->mValue, thisLocal->mResolvedType);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue