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
The REPL will panic if the result of partial evaluation contains an empty query. This can be reproduced by simply enabling partial evaluation and then evaluating a trivial query like true.
> unknown input
> true
The problem is that the ast.Body location getter assumes that bodies are non-empty.
The text was updated successfully, but these errors were encountered:
Previously, if an empty ast.Body was passed to the formatting package,
it would trigger a panic because the location getter would try to index
into an empty slice.
These changes make the location getter tolerate empty bodies and the
format package tolerate nil locations on empty bodies. The changes also
improve simplify the error message when nil locations are found.
Fixesopen-policy-agent#909
Signed-off-by: Torin Sandall <torinsandall@gmail.com>
Previously, if an empty ast.Body was passed to the formatting package,
it would trigger a panic because the location getter would try to index
into an empty slice.
These changes make the location getter tolerate empty bodies and the
format package tolerate nil locations on empty bodies. The changes also
improve simplify the error message when nil locations are found.
Fixes#909
Signed-off-by: Torin Sandall <torinsandall@gmail.com>
The REPL will panic if the result of partial evaluation contains an empty query. This can be reproduced by simply enabling partial evaluation and then evaluating a trivial query like
true
.The problem is that the ast.Body location getter assumes that bodies are non-empty.
The text was updated successfully, but these errors were encountered: