(content *hcl.BodyContent, blockLabels []blockLabel, ctx *hcl.EvalContext)
| 1643 | } |
| 1644 | |
| 1645 | func (s *RefineValueSpec) decode(content *hcl.BodyContent, blockLabels []blockLabel, ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) { |
| 1646 | wrappedVal, diags := s.Wrapped.decode(content, blockLabels, ctx) |
| 1647 | if diags.HasErrors() { |
| 1648 | // We won't try to run our function in this case, because it'll probably |
| 1649 | // generate confusing additional errors that will distract from the |
| 1650 | // root cause. |
| 1651 | return cty.UnknownVal(s.impliedType().WithoutOptionalAttributesDeep()), diags |
| 1652 | } |
| 1653 | |
| 1654 | return wrappedVal.RefineWith(s.Refine), diags |
| 1655 | } |
| 1656 | |
| 1657 | func (s *RefineValueSpec) impliedType() cty.Type { |
| 1658 | return s.Wrapped.impliedType() |
nothing calls this directly
no test coverage detected