We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-
When evaluating
{ 1, 2, 3 } - 3
you get this error message:
{ 1, 2, 3 } - 3: eval_type_error: minus: operand 2 must be one of {number, set} but got number
and vice versa for 3 - { 1, 2, 3 }.
3 - { 1, 2, 3 }
I'm not saying that it shouldn't error -- it should, this is wrong usage of the - operator -- it's just that the error reads funny. 😃
👉 playground
The text was updated successfully, but these errors were encountered:
Fixing this in one place would be relatively easy.
I'm wondering if we'd be better off replacing the built-in function operand errors with the ast package-style type errors. E.g., in this case...
ast
eval_type_error: invalid argument(s) have: (set[number], number) want (one of): (set[any], set[any]) (number, number)
Sorry, something went wrong.
This issue has been automatically marked as inactive because it has not had any activity in the last 30 days.
topdown: Fix confusing error message for minus operator
72c9eae
Fixes open-policy-agent#1643 Signed-off-by: Torin Sandall <torinsandall@gmail.com>
topdown: Fix confusing error message for minus operator (#4090)
af4ad84
Fixes #1643 Signed-off-by: Torin Sandall <torinsandall@gmail.com>
Successfully merging a pull request may close this issue.
Expected/Actual Behavior
When evaluating
you get this error message:
and vice versa for
3 - { 1, 2, 3 }
.I'm not saying that it shouldn't error -- it should, this is wrong usage of the
-
operator -- it's just that the error reads funny. 😃Additional Info
👉 playground
The text was updated successfully, but these errors were encountered: