-
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.
ast/compile: reorder body for safety differently (#4801)
Our previous approach, ordering for closures first, and taking the growing set of output variables of the reordered body into account in a second step, did not work out for some examples: object.get(input.subject.roles[_], comp, [""], output) comp = [ 1 | true ] every y in [2] { y in output } Here, the closure of `every` would have not checkout out because we've never registered the output variable `output` -- since the first call to object.get is unsafe without `comp`, too. Now, the two stages have been merged. It's got surprisingly little fallout, one test case had to be adjusted, which I believe to be a minor case, too. Fixes the second part of #4766. Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
- Loading branch information
Showing
2 changed files
with
95 additions
and
84 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