mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Fixed issue with 'sticky' methodrefs
This commit is contained in:
parent
8f5f06bdb1
commit
d5203f44db
2 changed files with 14 additions and 3 deletions
|
@ -1218,7 +1218,14 @@ BfTypedValue BfMethodMatcher::ResolveArgTypedValue(BfResolvedArg& resolvedArg, B
|
|||
}
|
||||
}
|
||||
else if ((resolvedArg.mArgFlags & BfArgFlag_LambdaBindAttempt) != 0)
|
||||
{
|
||||
{
|
||||
if ((argTypedValue) && (argTypedValue.mType->IsMethodRef()) &&
|
||||
((checkType == NULL) || (!checkType->IsMethodRef())))
|
||||
{
|
||||
// This may be from a previous checkMethod, clear it out
|
||||
argTypedValue = BfTypedValue();
|
||||
}
|
||||
|
||||
BfExprEvaluator exprEvaluator(mModule);
|
||||
exprEvaluator.mExpectingType = checkType;
|
||||
BF_ASSERT(resolvedArg.mExpression->IsA<BfLambdaBindExpression>());
|
||||
|
@ -1246,11 +1253,11 @@ BfTypedValue BfMethodMatcher::ResolveArgTypedValue(BfResolvedArg& resolvedArg, B
|
|||
}
|
||||
}
|
||||
}
|
||||
else if ((checkType == NULL) && (origCheckType != NULL) && (origCheckType->IsUnspecializedTypeVariation()) && (genericArgumentsSubstitute != NULL))
|
||||
else if ((checkType == NULL) && (origCheckType != NULL) && (origCheckType->IsUnspecializedTypeVariation()) && (genericArgumentsSubstitute != NULL) && (origCheckType->IsDelegateOrFunction()))
|
||||
{
|
||||
BfMethodInstance* methodInstance = mModule->GetRawMethodInstanceAtIdx(origCheckType->ToTypeInstance(), 0, "Invoke");
|
||||
if (methodInstance != NULL)
|
||||
{
|
||||
{
|
||||
if ((methodInstance->mReturnType->IsGenericParam()) && (((BfGenericParamType*)methodInstance->mReturnType)->mGenericParamKind == BfGenericParamKind_Method))
|
||||
{
|
||||
bool isValid = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue