mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
Display comptime invocation source on callstack
This commit is contained in:
parent
fefe1adbd1
commit
2d8221dffe
7 changed files with 281 additions and 90 deletions
|
@ -3075,9 +3075,11 @@ BfError* BfModule::Fail(const StringImpl& error, BfAstNode* refNode, bool isPers
|
|||
{
|
||||
mHadBuildError = true;
|
||||
|
||||
if ((mCompiler->mCeMachine->mCurContext != NULL) && (mCompiler->mCeMachine->mCurContext->mCurTargetSrc != NULL))
|
||||
if ((mCompiler->mCeMachine->mCurContext != NULL) && (mCompiler->mCeMachine->mCurContext->mCurCallSource != NULL) &&
|
||||
(mCompiler->mCeMachine->mCurContext->mCurCallSource->mRefNode != NULL))
|
||||
{
|
||||
BfError* bfError = mCompiler->mPassInstance->Fail("Comptime method generation had errors", mCompiler->mCeMachine->mCurContext->mCurTargetSrc);
|
||||
BfError* bfError = mCompiler->mPassInstance->Fail("Comptime method generation had errors",
|
||||
mCompiler->mCeMachine->mCurContext->mCurCallSource->mRefNode);
|
||||
if (bfError != NULL)
|
||||
mCompiler->mPassInstance->MoreInfo(error, refNode);
|
||||
return bfError;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue