You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally this looked like a type checking bug, but in fact it was
related to the safety check.
Previously, we filtered out safety errors for generated vars because
they are meaningless to the user. This led to unsafe queries being
allowed in some edge cases. For example: sum() > 1 would be
expanded to sum(__local0__); __local0__ > 1. The first expression is
unsafe but this would not be reported.
This change ensures that the compiler reports an error in all cases.
With this change, safety errors for generated vars are turned into error
messages indicating the expression is unsafe. Above, there would be a
single error indicating the expression "sum() > 1" is unsafe.
Fixesopen-policy-agent#661
Signed-off-by: Torin Sandall <[email protected]>
For example
However, other kinds of type errors are caught:
The text was updated successfully, but these errors were encountered: