Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix panic for partial provider defined functions in tuple expressions…
… (`[ provider:: ]`) When parsing invalid provider defined functions, a `nil` expression is returned. While there are diagnostics that correctly tell us about invalid configuration, in the editor we still need to continue working with the invalid configuration. This fix allows us to call `Variables()` on expressions that may have a nested nil in a tuple somewhere. We do this e.g. when [collecting reference origins](https://github.com/hashicorp/hcl-lang/blob/4db48f4b5961120c51b11216d040c095c0fd4a76/decoder/expr_any_ref_origins.go#L174) and instead of digging into the expressions at hand and deciding whether to call `.Variables()` or not, fixing it at the source seems more useful.
- Loading branch information