hclsyntax: Fix error message for inconsistent conditional expr values
This commit is contained in:
parent
7cc8ebfacf
commit
8dd89ebbb3
@ -486,7 +486,7 @@ func (e *ConditionalExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostic
|
||||
// "These expressions are object and object respectively" if the
|
||||
// object types don't exactly match.
|
||||
"The true and false result expressions must have consistent types. The given expressions are %s and %s, respectively.",
|
||||
trueResult.Type(), falseResult.Type(),
|
||||
trueResult.Type().FriendlyName(), falseResult.Type().FriendlyName(),
|
||||
),
|
||||
Subject: hcl.RangeBetween(e.TrueResult.Range(), e.FalseResult.Range()).Ptr(),
|
||||
Context: &e.SrcRange,
|
||||
|
Loading…
Reference in New Issue
Block a user