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

Fixed mixin node reference with target specifiers

This commit is contained in:
Brian Fiete 2022-02-12 10:58:42 -05:00
parent aacabd2e13
commit b784101e93

View file

@ -15732,6 +15732,21 @@ void BfExprEvaluator::InjectMixin(BfAstNode* targetSrc, BfTypedValue target, boo
if (scopedInvocationTarget != NULL)
targetNameNode = scopedInvocationTarget->mTarget;
while (true)
{
if (auto qualifiedNameNode = BfNodeDynCast<BfQualifiedNameNode>(targetNameNode))
{
targetNameNode = qualifiedNameNode->mRight;
continue;
}
if (auto memberRefExpr = BfNodeDynCast<BfMemberReferenceExpression>(targetNameNode))
{
targetNameNode = memberRefExpr->mMemberName;
continue;
}
break;
}
BfTypeInstance* mixinClass = NULL;
if (target.mType != NULL)
mixinClass = target.mType->ToTypeInstance();