diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index bd102b186..3b8c0b9c1 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -465,12 +465,6 @@ ErrorBuilder & ErrorBuilder::withFrame(const Env & env, co return *this; } -template -void ErrorBuilder::debugThrow() { - // NOTE: We always use the -LastTrace version as we push the new trace in withFrame() - state.debugThrowLastTrace(ErrorType(info)); -} - EvalState::EvalState( const Strings & _searchPath, diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh index ff407d090..5e88eb950 100644 --- a/src/libexpr/eval.hh +++ b/src/libexpr/eval.hh @@ -124,7 +124,11 @@ class ErrorBuilder ErrorBuilder & withFrame(const Env & e, const Expr & ex); [[gnu::noinline, gnu::noreturn]] - void debugThrow(); + void ErrorBuilder::debugThrow() { + // NOTE: We always use the -LastTrace version as we push the new trace in withFrame() + state.debugThrowLastTrace(ErrorType(info)); + } + };