hashicorp / hcl2

Former temporary home for experimental new version of HCL
https://github.com/hashicorp/hcl
Mozilla Public License 2.0
375 stars 64 forks source link

Variables not detected in JSON object keys #41

Closed apparentlymart closed 5 years ago

apparentlymart commented 6 years ago

From just reviewing the code here, it looks like we'd fail to detect a reference to a variable inside a key of an object that is being treated as an expression:

https://github.com/hashicorp/hcl2/blob/6558d83419b8415adbcc4df88fd6c8b56fbbaf5f/hcl/json/structure.go#L527-L531

Not confirmed yet, but we should write a test for this and then fix it if it is indeed broken.

apparentlymart commented 5 years ago

This is fixed (and also now tested) in ebe27107e1e2acf007cf22edb99a9e0e823ee25e.