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

Fixed delegate binding with var argument

This commit is contained in:
Brian Fiete 2021-11-27 11:22:10 -08:00
parent 7c292a8814
commit 244407c7fe

View file

@ -8940,7 +8940,8 @@ 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))