forked from open-policy-agent/opa
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ast: Fix panic during local var rewriting
This commit fixes an issue similar to e88579b: when a comprehension is nested inside of a set or used as an object key, the rewriting needs to be careful to make a copy of the set/object to avoid mutating the elemenet/key in-place. Fixes open-policy-agent#2720 Signed-off-by: Torin Sandall <[email protected]>
- Loading branch information
Showing
2 changed files
with
100 additions
and
27 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