From 9a9b03b8d636aae947bdf0c70eaeb9a2f9936cf6 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 14 Jul 2022 16:49:55 +0200 Subject: [PATCH] Fix showing attributes in traces --- src/libexpr/eval.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index a9cf7534a..94b351819 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -1464,7 +1464,7 @@ void ExprSelect::eval(EvalState & state, Env & env, Value & v) if (pos2) { auto pos2r = state.positions[pos2]; auto origin = std::get_if(&pos2r.origin); - if (!origin || *origin != state.derivationInternal) + if (!(origin && *origin == state.derivationInternal)) state.addErrorTrace(e, pos2, "while evaluating the attribute '%1%'", showAttrPath(state, env, attrPath)); }