mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
Fixed issue with local methods in generic types
This commit is contained in:
parent
5403cdb748
commit
ee4ae8f9ed
3 changed files with 35 additions and 9 deletions
|
@ -9474,14 +9474,14 @@ BfMethodInstance* BfModule::GetRawMethodByName(BfTypeInstance* typeInstance, con
|
|||
}
|
||||
|
||||
BfMethodInstance* BfModule::GetUnspecializedMethodInstance(BfMethodInstance* methodInstance, bool useUnspecializedType)
|
||||
{
|
||||
{
|
||||
if ((methodInstance->mMethodInfoEx != NULL) && (methodInstance->mMethodInfoEx->mMethodGenericArguments.size() != 0))
|
||||
methodInstance = methodInstance->mMethodInstanceGroup->mDefault;
|
||||
|
||||
auto owner = methodInstance->mMethodInstanceGroup->mOwner;
|
||||
|
||||
if (!useUnspecializedType)
|
||||
return GetRawMethodInstanceAtIdx(owner, methodInstance->mMethodDef->mIdx);
|
||||
return methodInstance;
|
||||
|
||||
if (!owner->IsGenericTypeInstance())
|
||||
return methodInstance;
|
||||
|
@ -17320,9 +17320,9 @@ void BfModule::ProcessMethod(BfMethodInstance* methodInstance, bool isInlineDup)
|
|||
methodState.mGenericTypeBindings = &methodInstance->GetMethodInfoEx()->mGenericTypeBindings;
|
||||
}
|
||||
else if ((((methodInstance->mMethodInfoEx != NULL) && ((int)methodInstance->mMethodInfoEx->mMethodGenericArguments.size() > dependentGenericStartIdx)) ||
|
||||
((mCurTypeInstance->IsGenericTypeInstance()) && (!isGenericVariation))))
|
||||
((mCurTypeInstance->IsGenericTypeInstance()) && (!isGenericVariation) && (!methodInstance->mMethodDef->mIsLocalMethod))))
|
||||
{
|
||||
unspecializedMethodInstance = GetUnspecializedMethodInstance(methodInstance);
|
||||
unspecializedMethodInstance = GetUnspecializedMethodInstance(methodInstance, !methodInstance->mMethodDef->mIsLocalMethod);
|
||||
|
||||
BF_ASSERT(unspecializedMethodInstance != methodInstance);
|
||||
if (!unspecializedMethodInstance->mHasBeenProcessed)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue