Make merge anchor errors for traversing nonfatal

This commit is contained in:
Steven WdV
2025-06-16 13:33:42 +02:00
parent bfcb3fc6b7
commit 31628e7324
3 changed files with 5 additions and 16 deletions
-14
View File
@@ -573,20 +573,6 @@ var traversePathOperatorScenarios = []expressionScenario{
"D0, P[a 2], (!!str)::c\n",
},
},
{
skipDoc: true,
document: badAliasSample,
expression: ".steps[]",
expectedError: "can only use merge anchors with maps (!!map) or sequences (!!seq) of maps, but got sequence containing !!str",
skipForGoccy: true, // throws an error on parsing, that's fine
},
{
skipDoc: true,
document: `{<<: 42}`,
expression: ".[]",
expectedError: "can only use merge anchors with maps (!!map) or sequences (!!seq) of maps, but got !!int",
skipForGoccy: true,
},
}
func TestTraversePathOperatorScenarios(t *testing.T) {