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

Fixed deferred arg handling of var generic methods

This commit is contained in:
Brian Fiete 2020-06-21 11:44:57 -07:00
parent e892840a94
commit 754b24cbd8

View file

@ -1064,7 +1064,7 @@ BfTypedValue BfMethodMatcher::ResolveArgTypedValue(BfResolvedArg& resolvedArg, B
if (mModule->mCurMethodState != NULL)
mModule->mCurMethodState->mNoBind = prevNoBind;
if (argTypedValue)
if ((argTypedValue) && (!argTypedValue.mType->IsVar()))
{
if (checkType != NULL)
resolvedArg.mExpectedType = checkType;
@ -1440,6 +1440,9 @@ bool BfMethodMatcher::CheckMethod(BfTypeInstance* targetTypeInstance, BfTypeInst
goto NoMatch;
//HashSet<BfType*> checkedTypeSet;
if (type->IsVar())
mHasVarArguments = true;
genericInferContext.mCheckedTypeSet.Clear();
if (!genericInferContext.InferGenericArgument(methodInstance, type, wantType, argTypedValue.mValue))
goto NoMatch;
@ -7372,7 +7375,10 @@ BfTypedValue BfExprEvaluator::MatchMethod(BfAstNode* targetSrc, BfMethodBoundExp
target = mModule->GetThis();
}
if (!moduleMethodInstance)
{
FinishDeferredEvals(argValues.mResolvedArgs);
return BfTypedValue();
}
bool isSkipCall = moduleMethodInstance.mMethodInstance->IsSkipCall(bypassVirtual);