-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
References were not being evaluated correctly. The top-level evalRefRec function was computing the ground prefix from the reference's binding and then performing the rest of the evaluation with the original reference and the prefix. Instead, the rest of the evaluation should proceed with the plugged value and the prefix. This fix was not compatible with how reference bindings were stored. Before, reference bindings were keyed with the original (potentially non-ground) reference. Now, they are keyed with the evaluated version of the reference. This version is guaranteed to be ground. As a result, the PlugValue handling of references must be updated to handle cases such as: orig ref: p[x][y] locals: {x: 1, y: 2} refs: {p[1][2]: "foo"} The solution is to recursively plug the ref. E.g., p[x][y] => p[1][y] => p[1][2] => "foo". Fixes #238
- Loading branch information
Showing
2 changed files
with
21 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters