Closed
Description
If a comprehension closes over local variables, they remain in the saved comprehension after being returned to the caller. As a result, when the caller receives a safety error when they try to compile the comprehension.
Example:
package test
p {
x = 1
[true | x] # close over local var 'x'
}
Partially evaluating the query data.test.p
results in:
[true | x] = _; neq(_, false); _ = true
Where x is unsafe.
The query evaluator should plug the comprehension before returning it to callers.
Activity