From 1f359bab03ca1daa262252b56dec8ec799afdcf2 Mon Sep 17 00:00:00 2001 From: James Bardin Date: Tue, 1 Dec 2020 16:12:31 -0500 Subject: [PATCH] internal/typeexpr: staticcheck diagnostics were appended to diags shadowing the intended value. --- internal/typeexpr/get_type.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/typeexpr/get_type.go b/internal/typeexpr/get_type.go index da84f5dcc..de5465b99 100644 --- a/internal/typeexpr/get_type.go +++ b/internal/typeexpr/get_type.go @@ -167,7 +167,7 @@ func getType(expr hcl.Expression, constraint bool) (cty.Type, hcl.Diagnostics) { // modifier optional(...) to indicate an optional attribute. If // so, we'll unwrap that first and make a note about it being // optional for when we construct the type below. - if call, diags := hcl.ExprCall(atyExpr); !diags.HasErrors() { + if call, callDiags := hcl.ExprCall(atyExpr); !callDiags.HasErrors() { if call.Name == "optional" { if len(call.Arguments) < 1 { diags = append(diags, &hcl.Diagnostic{