mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-14 14:24:10 +02:00
Fixed delegate binding with var argument
This commit is contained in:
parent
7c292a8814
commit
244407c7fe
1 changed files with 3 additions and 2 deletions
|
@ -8940,13 +8940,14 @@ BfTypedValue BfExprEvaluator::MatchMethod(BfAstNode* targetSrc, BfMethodBoundExp
|
||||||
{
|
{
|
||||||
BfType* retType = mModule->GetPrimitiveType(BfTypeCode_Var);
|
BfType* retType = mModule->GetPrimitiveType(BfTypeCode_Var);
|
||||||
|
|
||||||
if ((!methodMatcher.mHadVarConflictingReturnType) && (methodMatcher.mBestRawMethodInstance != NULL) && (!methodMatcher.mBestRawMethodInstance->mReturnType->IsUnspecializedTypeVariation()))
|
if ((!methodMatcher.mHadVarConflictingReturnType) && (methodMatcher.mBestRawMethodInstance != NULL) && (!methodMatcher.mBestRawMethodInstance->mReturnType->IsUnspecializedTypeVariation()) &&
|
||||||
|
(prevBindResult.mPrevVal == NULL))
|
||||||
{
|
{
|
||||||
if ((!methodMatcher.mBestRawMethodInstance->mReturnType->IsGenericParam()) ||
|
if ((!methodMatcher.mBestRawMethodInstance->mReturnType->IsGenericParam()) ||
|
||||||
(((BfGenericParamType*)methodMatcher.mBestRawMethodInstance->mReturnType)->mGenericParamKind != BfGenericParamKind_Method))
|
(((BfGenericParamType*)methodMatcher.mBestRawMethodInstance->mReturnType)->mGenericParamKind != BfGenericParamKind_Method))
|
||||||
retType = methodMatcher.mBestRawMethodInstance->mReturnType;
|
retType = methodMatcher.mBestRawMethodInstance->mReturnType;
|
||||||
}
|
}
|
||||||
|
|
||||||
return mModule->GetDefaultTypedValue(retType, true, BfDefaultValueKind_Addr);
|
return mModule->GetDefaultTypedValue(retType, true, BfDefaultValueKind_Addr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue