diff options
-rw-r--r-- | src/libexpr/eval.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index e2070d546..4be4cfeea 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -1091,10 +1091,9 @@ void EvalState::callPrimOp(Value & fun, Value & arg, Value & v, const Pos & pos) void EvalState::callFunction(Value & fun, Value & arg, Value & v, const Pos & pos) { - std::optional<FunctionCallTrace> trace; - if (evalSettings.traceFunctionCalls) { - trace.emplace(pos); - } + std::unique_ptr<FunctionCallTrace> trace; + if (evalSettings.traceFunctionCalls) + trace = std::make_unique<FunctionCallTrace>(pos); forceValue(fun, pos); |