hclsyntax: Annotate diags from IndexExpr with source expr information
This commit is contained in:
parent
f6fe9b5c69
commit
b21bf61698
@ -604,7 +604,9 @@ func (e *IndexExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) {
|
|||||||
diags = append(diags, collDiags...)
|
diags = append(diags, collDiags...)
|
||||||
diags = append(diags, keyDiags...)
|
diags = append(diags, keyDiags...)
|
||||||
|
|
||||||
return hcl.Index(coll, key, &e.SrcRange)
|
val, diags := hcl.Index(coll, key, &e.SrcRange)
|
||||||
|
setDiagEvalContext(diags, e, ctx)
|
||||||
|
return val, diags
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *IndexExpr) Range() hcl.Range {
|
func (e *IndexExpr) Range() hcl.Range {
|
||||||
|
Loading…
Reference in New Issue
Block a user