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

Avoid putting things like ValueType into Fail types for ValueType.Equals

This commit is contained in:
Brian Fiete 2024-02-13 08:34:34 -05:00
parent 36700b39ab
commit 337a94b8b5

View file

@ -3578,6 +3578,7 @@ BfError* CeContext::Fail(const StringImpl& error)
return NULL;
if (mCurEmitContext != NULL)
mCurEmitContext->mFailed = true;
SetAndRestoreValue<BfTypeInstance*> prevTypeInst(mCurModule->mCurTypeInstance, mCallerTypeInstance);
auto bfError = mCurModule->Fail(StrFormat("Unable to comptime %s", mCurModule->MethodToString(mCurMethodInstance).c_str()), mCurCallSource->mRefNode, (mCurEvalFlags & CeEvalFlags_PersistantError) != 0);
if (bfError == NULL)
return NULL;
@ -3593,6 +3594,7 @@ BfError* CeContext::Fail(const CeFrame& curFrame, const StringImpl& str)
{
if (mCurEmitContext != NULL)
mCurEmitContext->mFailed = true;
SetAndRestoreValue<BfTypeInstance*> prevTypeInst(mCurModule->mCurTypeInstance, mCallerTypeInstance);
auto bfError = mCurModule->Fail(StrFormat("Unable to comptime %s", mCurModule->MethodToString(mCurMethodInstance).c_str()), mCurCallSource->mRefNode,
(mCurEvalFlags & CeEvalFlags_PersistantError) != 0,
((mCurEvalFlags & CeEvalFlags_DeferIfNotOnlyError) != 0) && !mCurModule->mHadBuildError);