lang/funcs: Fix broken test for lookup function

When the value we're looking in has an object type, we need to know the
key in order to decide the result type. Therefore an object lookup with
an unknown key must produce cty.DynamicVal, not an unknown value with a
known type.
This commit is contained in:
Martin Atkins 2018-11-05 17:17:28 -08:00
parent 8f578c365f
commit 8c01cf7293
1 changed files with 1 additions and 1 deletions

View File

@ -1287,7 +1287,7 @@ func TestLookup(t *testing.T) {
}),
cty.UnknownVal(cty.String),
},
cty.UnknownVal(cty.String),
cty.DynamicVal, // if the key is unknown then we don't know which object attribute and thus can't know the type
false,
},
}