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

Fixed CreateFakeCallerMethod issue with failed methods

This commit is contained in:
Brian Fiete 2020-05-04 11:43:48 -07:00
parent 28c3179d4f
commit a81f76ffcd

View file

@ -3873,6 +3873,9 @@ void BfModule::EmitEquals(BfTypedValue leftValue, BfTypedValue rightValue, BfIRB
void BfModule::CreateFakeCallerMethod(const String& funcName) void BfModule::CreateFakeCallerMethod(const String& funcName)
{ {
if (mCurMethodInstance->mHasFailed)
return;
BF_ASSERT(mCurMethodInstance->mIRFunction); BF_ASSERT(mCurMethodInstance->mIRFunction);
auto voidType = mBfIRBuilder->MapType(GetPrimitiveType(BfTypeCode_None)); auto voidType = mBfIRBuilder->MapType(GetPrimitiveType(BfTypeCode_None));
@ -13171,6 +13174,8 @@ void BfModule::AssertErrorState()
{ {
if (mCurMethodInstance->mIsUnspecializedVariation) if (mCurMethodInstance->mIsUnspecializedVariation)
return; return;
if (mCurMethodInstance->mHasFailed)
return;
} }
// We want the module to be marked as failed even if it's just an error in the parser // We want the module to be marked as failed even if it's just an error in the parser