summaryrefslogtreecommitdiff
path: root/hclsyntax
diff options
context:
space:
mode:
authorLiam Cervante <liam.cervante@hashicorp.com>2022-11-02 09:12:56 +0100
committerLiam Cervante <liam.cervante@hashicorp.com>2022-11-02 09:12:56 +0100
commitdc40a38475ecd775adfa53c262bf8fcebc8a3ecb (patch)
tree1e97c57fbe061c6ebe8860615934489ae8e07129 /hclsyntax
parent987fe04c7f2fc7a9babe7f112c3d7ecffffb3365 (diff)
Add comment clarifying why the given test cases are failing
Diffstat (limited to 'hclsyntax')
-rw-r--r--hclsyntax/expression_test.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/hclsyntax/expression_test.go b/hclsyntax/expression_test.go
index d22406f..8a15d11 100644
--- a/hclsyntax/expression_test.go
+++ b/hclsyntax/expression_test.go
@@ -1959,6 +1959,10 @@ func TestExpressionErrorMessages(t *testing.T) {
"The true and false result expressions must have consistent types. The 'false' value includes object attribute \"b\", which is absent in the 'true' value.",
},
{
+ // Failing cases for automatic collection conversions. HCL and cty
+ // will attempt to unify tuples into lists. We have to make sure
+ // the tuple inner types have no common base type, so we mix and
+ // match booleans and numbers and validate the error messages.
"true ? listOf2Tuple : listOf1Tuple",
&hcl.EvalContext{
Variables: map[string]cty.Value{