-
Notifications
You must be signed in to change notification settings - Fork 251
Open
Description
Feature request checklist
- There are no issues that match the desired change
- The change is large enough it can't be addressed with a simple Pull Request
- If this is a bug, please file a Bug Report.
Change
Similar to how exhaustive eval of and
merges the unknowns, I think there should be exhaustive eval for these types.
// If any argument is unknown or error early terminate.
for i, key := range m.keys {
keyVal := key.Eval(ctx)
if types.IsUnknownOrError(keyVal) {
return keyVal
}
valVal := m.vals[i].Eval(ctx)
if types.IsUnknownOrError(valVal) {
return valVal
}
}
You can see in the map code that the first unknown or error hit short circuits and returns, but if I'm building a map out of two unknowns, it would be nice for this to evaluate to the merging of those two unknowns when using exhaustive evaluation. Same applies to list and object.
Example
{"foo": a, "bar": b}
evaluates to
a (4) (*types.Unknown)
Desired output should be the same as
a && b
evaluates to
b (2), a (1) (*types.Unknown)
Metadata
Metadata
Assignees
Labels
No labels