topdown: Fix bug in var rewriting during trace formatting
This commit fixes a bug in the var rewritting improvement that was introduced in v0.16.0. With this change the rewriting is performed on the deep copied node as it should be. Also, this change updates the rewriting to use the ast.TransformVars helper instead of the generic visitor so that object keys and sets are handled properly. Fixes #2022 Signed-off-by: Torin Sandall <torinsandall@gmail.com>
T
Torin Sandall committed
cfe36e55ff92bd4f19f89d7619e349029e1b42d2
Parent: 9b7c645