Fix precedence of merge anchor sequence for traverse (explode was already correct)

This commit is contained in:
Steven WdV
2025-06-16 13:36:42 +02:00
parent 31628e7324
commit 4d88d51b1b
3 changed files with 16 additions and 14 deletions
+4 -4
View File
@@ -449,11 +449,11 @@ var traversePathOperatorScenarios = []expressionScenario{
},
{
description: "Traversing merge anchor lists",
subdescription: "Note that the later merge anchors override previous",
subdescription: "Note that the keys earlier in the merge anchors sequence override later ones",
document: mergeDocSample,
expression: `.foobarList.thing`,
expected: []string{
"D0, P[bar thing], (!!str)::bar_thing\n",
"D0, P[foo thing], (!!str)::foo_thing\n",
},
},
{
@@ -478,9 +478,9 @@ var traversePathOperatorScenarios = []expressionScenario{
expression: `.foobarList[]`,
expected: []string{
"D0, P[bar b], (!!str)::bar_b\n",
"D0, P[foo a], (!!str)::foo_a\n",
"D0, P[bar thing], (!!str)::bar_thing\n",
"D0, P[foo thing], (!!str)::foo_thing\n",
"D0, P[foobarList c], (!!str)::foobarList_c\n",
"D0, P[foo a], (!!str)::foo_a\n",
},
},
{