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

Added static search lookup for mixins

This commit is contained in:
Brian Fiete 2022-04-17 10:34:42 -07:00
parent 501491d875
commit 7e59c7fb93

View file

@ -16333,6 +16333,22 @@ void BfExprEvaluator::InjectMixin(BfAstNode* targetSrc, BfTypedValue target, boo
} }
} }
if (methodMatcher.mBestMethodDef == NULL)
{
BfStaticSearch* staticSearch = mModule->GetStaticSearch();
if (staticSearch != NULL)
{
for (auto typeInst : staticSearch->mStaticTypes)
{
if (methodMatcher.CheckType(typeInst, BfTypedValue(), false))
{
if (methodMatcher.mBestMethodDef != NULL)
break;
}
}
}
}
if (methodMatcher.mBestMethodDef == NULL) if (methodMatcher.mBestMethodDef == NULL)
{ {
mModule->Fail("Cannot find mixin", targetSrc); mModule->Fail("Cannot find mixin", targetSrc);