Fix regression (#164)

Second lookup of an object rule without fully qualified path, resulted
in returning the object instead of the requested field.

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
This commit is contained in:
Anand Krishnamoorthi
2024-02-26 17:31:48 -08:00
committed by GitHub
parent 595f9d34d5
commit fbfed6b49c
2 changed files with 19 additions and 4 deletions

View File

@@ -36,7 +36,7 @@ cases:
true: false,
[1, 3] : {"hello", "world"}
}
query: data.test
want_result:
array: [1, 2, 3]
@@ -71,5 +71,19 @@ cases:
set!:
- "hello"
- "world"
- note: value chain (unqualified)
data: {}
modules:
- |
package test
a = {
"b" : 5
}
x = a.b
# The second look up must also produce the same value.
y = a.b
query: data.test.y
want_result: 5