-
Notifications
You must be signed in to change notification settings - Fork 599
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hclwrite: Fix panic for dotted full splat (foo.*)
The following expression caused a panic in hclwrite: a = foo.* This was due to the unusual dotted form of a full splat (where the splat operator is at the end of the expression) being generated with an invalid source range. In the full splat case, the end of the range was uninitialized, which caused the token slice to be empty, and thus the panic. This commit fixes the bug, adds test coverage, and includes some bonus tests for other splat expression cases.
- Loading branch information
Showing
2 changed files
with
217 additions
and
0 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