From 769de259f0060d55ec8317c109cf12aa4003f7fe Mon Sep 17 00:00:00 2001 From: Shay Bergmann Date: Tue, 26 Oct 2021 14:43:15 +0000 Subject: [PATCH] toJSON: pass pos in case of a list as well --- src/libexpr/value-to-json.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libexpr/value-to-json.cc b/src/libexpr/value-to-json.cc index 7c28754f5..1c3849593 100644 --- a/src/libexpr/value-to-json.cc +++ b/src/libexpr/value-to-json.cc @@ -65,7 +65,7 @@ void printValueAsJSON(EvalState & state, bool strict, auto list(out.list()); for (unsigned int n = 0; n < v.listSize(); ++n) { auto placeholder(list.placeholder()); - printValueAsJSON(state, strict, *v.listElems()[n], noPos, placeholder, context); + printValueAsJSON(state, strict, *v.listElems()[n], pos, placeholder, context); } break; }