From 337a94b8b5fee8acea9a8e914cb964dd6f7c7ca3 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Tue, 13 Feb 2024 08:34:34 -0500 Subject: [PATCH] Avoid putting things like ValueType into Fail types for ValueType.Equals --- IDEHelper/Compiler/CeMachine.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/IDEHelper/Compiler/CeMachine.cpp b/IDEHelper/Compiler/CeMachine.cpp index 5fed2a75..96b90544 100644 --- a/IDEHelper/Compiler/CeMachine.cpp +++ b/IDEHelper/Compiler/CeMachine.cpp @@ -3578,6 +3578,7 @@ BfError* CeContext::Fail(const StringImpl& error) return NULL; if (mCurEmitContext != NULL) mCurEmitContext->mFailed = true; + SetAndRestoreValue 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 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);