mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +02:00
Fixed 'this' regression in unary operation on base properties
This commit is contained in:
parent
4f978c5053
commit
ae84564fca
2 changed files with 14 additions and 3 deletions
|
@ -21544,7 +21544,8 @@ BfTypedValue BfExprEvaluator::PerformUnaryOperation_TryOperator(const BfTypedVal
|
|||
void BfExprEvaluator::PerformUnaryOperation_OnResult(BfExpression* unaryOpExpr, BfUnaryOp unaryOp, BfTokenNode* opToken, BfUnaryOpFlags opFlags)
|
||||
{
|
||||
BfAstNode* propSrc = mPropSrc;
|
||||
BfTypedValue propTarget = mOrigPropTarget;
|
||||
BfTypedValue origPropTarget = mOrigPropTarget;
|
||||
BfTypedValue propTarget = mPropTarget;
|
||||
BfPropertyDef* propDef = mPropDef;
|
||||
SizedArray<BfResolvedArg, 2> indexerVals = mIndexerValues;
|
||||
BfTypedValue writeToProp;
|
||||
|
@ -22056,8 +22057,14 @@ void BfExprEvaluator::PerformUnaryOperation_OnResult(BfExpression* unaryOpExpr,
|
|||
|
||||
SizedArray<BfIRValue, 4> args;
|
||||
if (!setMethod->mIsStatic)
|
||||
PushThis(propSrc, propTarget, methodInstance.mMethodInstance, args);
|
||||
//args.push_back(propTarget.mValue);
|
||||
{
|
||||
auto usePropTarget = propTarget;
|
||||
if (origPropTarget.mType == methodInstance.mMethodInstance->GetOwner())
|
||||
usePropTarget = origPropTarget;
|
||||
else
|
||||
BF_ASSERT(propTarget.mType == methodInstance.mMethodInstance->GetOwner());
|
||||
PushThis(propSrc, usePropTarget, methodInstance.mMethodInstance, args);
|
||||
}
|
||||
|
||||
for (int paramIdx = 0; paramIdx < (int)indexerVals.size(); paramIdx++)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue