diff options
author | Nathan Dench <ndenc2@gmail.com> | 2019-05-24 15:16:44 +1000 |
---|---|---|
committer | Nathan Dench <ndenc2@gmail.com> | 2019-05-24 15:16:44 +1000 |
commit | 107c1cdb09c575aa2f61d97f48d8587eb6bada4c (patch) | |
tree | ca7d008643efc555c388baeaf1d986e0b6b3e28c /vendor/github.com/hashicorp/hcl2/hcl/traversal_for_expr.go | |
parent | 844b5a68d8af4791755b8f0ad293cc99f5959183 (diff) | |
download | terraform-provider-statuscake-107c1cdb09c575aa2f61d97f48d8587eb6bada4c.tar.gz terraform-provider-statuscake-107c1cdb09c575aa2f61d97f48d8587eb6bada4c.tar.zst terraform-provider-statuscake-107c1cdb09c575aa2f61d97f48d8587eb6bada4c.zip |
Upgrade to 0.12
Diffstat (limited to 'vendor/github.com/hashicorp/hcl2/hcl/traversal_for_expr.go')
-rw-r--r-- | vendor/github.com/hashicorp/hcl2/hcl/traversal_for_expr.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vendor/github.com/hashicorp/hcl2/hcl/traversal_for_expr.go b/vendor/github.com/hashicorp/hcl2/hcl/traversal_for_expr.go index 5f52946..d4a565a 100644 --- a/vendor/github.com/hashicorp/hcl2/hcl/traversal_for_expr.go +++ b/vendor/github.com/hashicorp/hcl2/hcl/traversal_for_expr.go | |||
@@ -52,11 +52,14 @@ func AbsTraversalForExpr(expr Expression) (Traversal, Diagnostics) { | |||
52 | func RelTraversalForExpr(expr Expression) (Traversal, Diagnostics) { | 52 | func RelTraversalForExpr(expr Expression) (Traversal, Diagnostics) { |
53 | traversal, diags := AbsTraversalForExpr(expr) | 53 | traversal, diags := AbsTraversalForExpr(expr) |
54 | if len(traversal) > 0 { | 54 | if len(traversal) > 0 { |
55 | ret := make(Traversal, len(traversal)) | ||
56 | copy(ret, traversal) | ||
55 | root := traversal[0].(TraverseRoot) | 57 | root := traversal[0].(TraverseRoot) |
56 | traversal[0] = TraverseAttr{ | 58 | ret[0] = TraverseAttr{ |
57 | Name: root.Name, | 59 | Name: root.Name, |
58 | SrcRange: root.SrcRange, | 60 | SrcRange: root.SrcRange, |
59 | } | 61 | } |
62 | return ret, diags | ||
60 | } | 63 | } |
61 | return traversal, diags | 64 | return traversal, diags |
62 | } | 65 | } |