aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/hashicorp/hcl2/hcl/json/structure.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/hashicorp/hcl2/hcl/json/structure.go')
-rw-r--r--vendor/github.com/hashicorp/hcl2/hcl/json/structure.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/vendor/github.com/hashicorp/hcl2/hcl/json/structure.go b/vendor/github.com/hashicorp/hcl2/hcl/json/structure.go
index bdc0e98..74847c7 100644
--- a/vendor/github.com/hashicorp/hcl2/hcl/json/structure.go
+++ b/vendor/github.com/hashicorp/hcl2/hcl/json/structure.go
@@ -416,12 +416,14 @@ func (e *expression) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) {
416 case *booleanVal: 416 case *booleanVal:
417 return cty.BoolVal(v.Value), nil 417 return cty.BoolVal(v.Value), nil
418 case *arrayVal: 418 case *arrayVal:
419 var diags hcl.Diagnostics
419 vals := []cty.Value{} 420 vals := []cty.Value{}
420 for _, jsonVal := range v.Values { 421 for _, jsonVal := range v.Values {
421 val, _ := (&expression{src: jsonVal}).Value(ctx) 422 val, valDiags := (&expression{src: jsonVal}).Value(ctx)
422 vals = append(vals, val) 423 vals = append(vals, val)
424 diags = append(diags, valDiags...)
423 } 425 }
424 return cty.TupleVal(vals), nil 426 return cty.TupleVal(vals), diags
425 case *objectVal: 427 case *objectVal:
426 var diags hcl.Diagnostics 428 var diags hcl.Diagnostics
427 attrs := map[string]cty.Value{} 429 attrs := map[string]cty.Value{}