mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Fixed ResolveGenericType case from unspecialized type variation
This commit is contained in:
parent
90fa8941a6
commit
f999ada369
1 changed files with 9 additions and 1 deletions
|
@ -14785,7 +14785,15 @@ BfModuleMethodInstance BfExprEvaluator::GetSelectedMethod(BfAstNode* targetSrc,
|
|||
if (unspecializedMethod == NULL)
|
||||
unspecializedMethod = mModule->GetRawMethodInstance(curTypeInst, methodDef);
|
||||
|
||||
BfType* specializedReturnType = mModule->ResolveGenericType(unspecializedMethod->mReturnType, NULL, &methodMatcher.mBestMethodGenericArguments);
|
||||
BfTypeVector* typeGenericArgs = NULL;
|
||||
auto typeUnspecMethodInstance = unspecializedMethod;
|
||||
if (curTypeInst->IsUnspecializedTypeVariation())
|
||||
{
|
||||
typeUnspecMethodInstance = mModule->GetUnspecializedMethodInstance(typeUnspecMethodInstance, true);
|
||||
typeGenericArgs = &curTypeInst->mGenericTypeInfo->mTypeGenericArguments;
|
||||
}
|
||||
|
||||
BfType* specializedReturnType = mModule->ResolveGenericType(typeUnspecMethodInstance->mReturnType, typeGenericArgs, &methodMatcher.mBestMethodGenericArguments);
|
||||
if (specializedReturnType != NULL)
|
||||
*overrideReturnType = specializedReturnType;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue