summaryrefslogtreecommitdiff
path: root/ext/dynblock/expr_wrap.go
diff options
context:
space:
mode:
authorMartin Atkins <mart@degeneration.co.uk>2024-05-08 16:09:28 -0700
committerMartin Atkins <mart@degeneration.co.uk>2024-05-09 11:28:37 -0700
commitbc757658ca11c5d6d17f328d5672ac447c3efcff (patch)
tree35551c0e20ef37419e22a4065392906b2e18dee0 /ext/dynblock/expr_wrap.go
parentbf546973d01a1ec4a306cbcc789bd86ea70e44be (diff)
hclsyntax: Don't panic if splat operand is unknown and marked
We were calling .Range() on any unknown sourceVal, without first checking whether it was marked. That method panics if called on a marked value, so we need to strip that off first. While testing this I found some return paths that weren't properly transferring the source value's marks to the output, and so this also addresses those so that all return paths preserve whatever markings are present on the source value. In particular, if a non-list/set/tuple value gets "upgraded" into a tuple then we must transfer its marks onto the tuple, because the decision about constructing that value was based on characteristics of the source value.
Diffstat (limited to 'ext/dynblock/expr_wrap.go')
0 files changed, 0 insertions, 0 deletions