mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
Fixed deferred arg handling of var generic methods
This commit is contained in:
parent
e892840a94
commit
754b24cbd8
1 changed files with 7 additions and 1 deletions
|
@ -1064,7 +1064,7 @@ BfTypedValue BfMethodMatcher::ResolveArgTypedValue(BfResolvedArg& resolvedArg, B
|
||||||
if (mModule->mCurMethodState != NULL)
|
if (mModule->mCurMethodState != NULL)
|
||||||
mModule->mCurMethodState->mNoBind = prevNoBind;
|
mModule->mCurMethodState->mNoBind = prevNoBind;
|
||||||
|
|
||||||
if (argTypedValue)
|
if ((argTypedValue) && (!argTypedValue.mType->IsVar()))
|
||||||
{
|
{
|
||||||
if (checkType != NULL)
|
if (checkType != NULL)
|
||||||
resolvedArg.mExpectedType = checkType;
|
resolvedArg.mExpectedType = checkType;
|
||||||
|
@ -1440,6 +1440,9 @@ bool BfMethodMatcher::CheckMethod(BfTypeInstance* targetTypeInstance, BfTypeInst
|
||||||
goto NoMatch;
|
goto NoMatch;
|
||||||
//HashSet<BfType*> checkedTypeSet;
|
//HashSet<BfType*> checkedTypeSet;
|
||||||
|
|
||||||
|
if (type->IsVar())
|
||||||
|
mHasVarArguments = true;
|
||||||
|
|
||||||
genericInferContext.mCheckedTypeSet.Clear();
|
genericInferContext.mCheckedTypeSet.Clear();
|
||||||
if (!genericInferContext.InferGenericArgument(methodInstance, type, wantType, argTypedValue.mValue))
|
if (!genericInferContext.InferGenericArgument(methodInstance, type, wantType, argTypedValue.mValue))
|
||||||
goto NoMatch;
|
goto NoMatch;
|
||||||
|
@ -7372,7 +7375,10 @@ BfTypedValue BfExprEvaluator::MatchMethod(BfAstNode* targetSrc, BfMethodBoundExp
|
||||||
target = mModule->GetThis();
|
target = mModule->GetThis();
|
||||||
}
|
}
|
||||||
if (!moduleMethodInstance)
|
if (!moduleMethodInstance)
|
||||||
|
{
|
||||||
|
FinishDeferredEvals(argValues.mResolvedArgs);
|
||||||
return BfTypedValue();
|
return BfTypedValue();
|
||||||
|
}
|
||||||
|
|
||||||
bool isSkipCall = moduleMethodInstance.mMethodInstance->IsSkipCall(bypassVirtual);
|
bool isSkipCall = moduleMethodInstance.mMethodInstance->IsSkipCall(bypassVirtual);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue