Fixed alternative operator when LHS has empty matches

This commit is contained in:
Mike Farah
2021-04-13 10:53:46 +10:00
parent 095f921f62
commit 25e0a824c5
9 changed files with 53 additions and 23 deletions
+8
View File
@@ -13,6 +13,14 @@ var alternativeOperatorScenarios = []expressionScenario{
"D0, P[a], (!!str)::bridge\n",
},
},
{
expression: `select(tag == "seq") // "cat"`,
skipDoc: true,
document: `a: frog`,
expected: []string{
"D0, P[], (!!str)::cat\n",
},
},
{
description: "LHS is not defined",
expression: `.a // "hello"`,