mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-11 04:52:21 +02:00
Fixed some var-binding issues
This commit is contained in:
parent
7293f5c253
commit
00b8bb59a7
1 changed files with 11 additions and 0 deletions
|
@ -10582,6 +10582,8 @@ void BfExprEvaluator::Visit(BfDelegateBindExpression* delegateBindExpr)
|
||||||
|
|
||||||
if (bindResult.mMethodInstance == NULL)
|
if (bindResult.mMethodInstance == NULL)
|
||||||
{
|
{
|
||||||
|
if ((mResult) && (mResult.mType->IsVar()))
|
||||||
|
return;
|
||||||
mResult = BfTypedValue();
|
mResult = BfTypedValue();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -14233,7 +14235,16 @@ void BfExprEvaluator::InjectMixin(BfAstNode* targetSrc, BfTypedValue target, boo
|
||||||
|
|
||||||
auto moduleMethodInstance = GetSelectedMethod(targetSrc, methodMatcher.mBestMethodTypeInstance, methodMatcher.mBestMethodDef, methodMatcher);
|
auto moduleMethodInstance = GetSelectedMethod(targetSrc, methodMatcher.mBestMethodTypeInstance, methodMatcher.mBestMethodDef, methodMatcher);
|
||||||
if (!moduleMethodInstance)
|
if (!moduleMethodInstance)
|
||||||
|
{
|
||||||
|
if (methodMatcher.mHasVarArguments)
|
||||||
|
{
|
||||||
|
mResult = mModule->GetDefaultTypedValue(mModule->GetPrimitiveType(BfTypeCode_Var));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
mModule->Fail("Failed to get selected mixin", targetSrc);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
auto methodInstance = moduleMethodInstance.mMethodInstance;
|
auto methodInstance = moduleMethodInstance.mMethodInstance;
|
||||||
|
|
||||||
for (int checkGenericIdx = 0; checkGenericIdx < (int)methodMatcher.mBestMethodGenericArguments.size(); checkGenericIdx++)
|
for (int checkGenericIdx = 0; checkGenericIdx < (int)methodMatcher.mBestMethodGenericArguments.size(); checkGenericIdx++)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue