diff --git a/hcl/hclsyntax/structure.go b/hcl/hclsyntax/structure.go index ebafcb4..22e389c 100644 --- a/hcl/hclsyntax/structure.go +++ b/hcl/hclsyntax/structure.go @@ -255,9 +255,9 @@ func (b *Body) JustAttributes() (hcl.Attributes, hcl.Diagnostics) { example := b.Blocks[0] diags = append(diags, &hcl.Diagnostic{ Severity: hcl.DiagError, - Summary: fmt.Sprintf("Unexpected %s block", example.Type), + Summary: fmt.Sprintf("Unexpected %q block", example.Type), Detail: "Blocks are not allowed here.", - Context: &example.TypeRange, + Subject: &example.TypeRange, }) // we will continue processing anyway, and return the attributes // we are able to find so that certain analyses can still be done