-
Notifications
You must be signed in to change notification settings - Fork 638
Closed
Description
Initially reported in opentofu/opentofu#2327, it appears that null handling with nested splats can cause panics in seemingly valid HCL.
I traced it down to https://github.com/hashicorp/hcl/blob/b48ba6e/hclsyntax/expression.go#L1803. Instead of returning a tuple with a null element, it returns an empty tuple. When patched to instead return cty.TupleVal([]cty.Value{sourceVal}).WithSameMarks(sourceVal), it functions as expected in this particular scenario.
What I have not yet investigated is what the intended code path here is, should it be an error caught earlier in the process or should the patch above be accepted as the "correct" functionality here.
It looks like it was originally introduced in 2b184ca
Metadata
Metadata
Assignees
Labels
No labels