Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hclwrite: Fix panic for dotted full splat (foo.*) #374

Merged
merged 1 commit into from
May 14, 2020

Commits on May 13, 2020

  1. 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.
    alisdair committed May 13, 2020
    Configuration menu
    Copy the full SHA
    d58c873 View commit details
    Browse the repository at this point in the history