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

@@ -2561,7 +2561,8 @@ impl Interpreter {
path.push(name.text());
if self.is_processed(&path)? {
return Ok(Self::get_value_chained(self.data.clone(), &path));
let value = Self::get_value_chained(self.data.clone(), &path);
return Ok(Self::get_value_chained(value, fields));
}
// Ensure that all the rules having common prefix (name) are evaluated.