1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-11 04:52:21 +02:00

Fixed 'this' calls in mixins

This commit is contained in:
Brian Fiete 2020-01-24 11:51:02 -08:00
parent fd64aa64d9
commit 49122ae6aa

View file

@ -6095,7 +6095,15 @@ BfTypedValue BfExprEvaluator::MatchMethod(BfAstNode* targetSrc, BfMethodBoundExp
{
checkNonStatic = false;
}
else if (mModule->mCurMethodState->mTempKind != BfMethodState::TempKind_None)
else
{
if (mModule->mCurMethodState->mMixinState != NULL)
{
targetTypeInst = mModule->mCurMethodState->mMixinState->mMixinMethodInstance->GetOwner();
curTypeDef = targetTypeInst->mTypeDef;
}
if (mModule->mCurMethodState->mTempKind != BfMethodState::TempKind_None)
{
checkNonStatic = mModule->mCurMethodState->mTempKind == BfMethodState::TempKind_NonStatic;
}
@ -6103,6 +6111,7 @@ BfTypedValue BfExprEvaluator::MatchMethod(BfAstNode* targetSrc, BfMethodBoundExp
checkNonStatic = !mModule->mCurMethodInstance->mMethodDef->mIsStatic;
}
}
}
bool isIndirectMethodCall = false;
BfType* lookupType = targetType;