1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 12:02:21 +02:00

Fixed void skipcall boxed methods

This commit is contained in:
Brian Fiete 2020-04-28 07:30:45 -07:00
parent 4b2256d41e
commit 91b5ab36ca
2 changed files with 15 additions and 2 deletions

View file

@ -12225,6 +12225,16 @@ bool BfModule::IsInGeneric()
return (mCurMethodInstance->GetNumGenericArguments() != 0) || (mCurTypeInstance->IsGenericTypeInstance());
}
bool BfModule::InDefinitionSection()
{
if (mCurTypeInstance != NULL)
{
if (mCurTypeInstance->IsUnspecializedTypeVariation())
return false;
}
return !IsInSpecializedSection();
}
bool BfModule::IsInSpecializedGeneric()
{
if ((mCurMethodInstance == NULL) || (mCurMethodInstance->mIsUnspecialized))
@ -17016,6 +17026,8 @@ void BfModule::ProcessMethod(BfMethodInstance* methodInstance, bool isInlineDup)
auto retVal = GetDefaultValue(methodInstance->mReturnType);
CreateReturn(retVal);
}
else
mBfIRBuilder->CreateRetVoid();
}
else
{

View file

@ -1537,6 +1537,7 @@ public:
BfTypedValue GetThis();
BfLocalVariable* GetThisVariable();
bool IsInGeneric();
bool InDefinitionSection();
bool IsInSpecializedGeneric();
bool IsInSpecializedSection(); // Either a specialized generic or an injected mixin
bool IsInUnspecializedGeneric();