-
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.
topdown: Fix corrupt object panic caused by copy propagation
Mutating term values used as object keys (or set elements) is not safe because the underlying hashtables get corrupted. This a known issue that was previously fixed in the compiler (#1125). The simplest solution in this case is to use the ast.Transform helper instead of ast.Walk so that a copy of object and set terms is made. Fixes #1177 Signed-off-by: Torin Sandall <torinsandall@gmail.com>
- Loading branch information
Showing
2 changed files
with
93 additions
and
49 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