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
I would expect that using floating points with the modulo operator is caught somewhere and an error is raised. This is similar to what happens if you e.g. divide by zero:
jasper@kakigori$ opa run
OPA 0.10.5 (commit 8b08af7f, built at 2019-02-25T16:39:16Z)
Run 'help' to see a list of commands.
> 1 / 0
1 / 0: eval_internal_error: div: divide by zero
>
Actual Behavior
The process panics:
jasper@kakigori$ opa run
OPA 0.10.5 (commit 8b08af7f, built at 2019-02-25T16:39:16Z)
Run 'help' to see a list of commands.
> 1.1 % 1
panic: illegal value
goroutine 1 [running]:
github.com/open-policy-agent/opa/topdown/builtins.NumberToInt(0xc000203850, 0x3, 0xd6e360)
/go/src/github.com/open-policy-agent/opa/topdown/builtins/builtins.go:163 +0x96
...
main.main()
/go/src/github.com/open-policy-agent/opa/main.go:12 +0x2d
Steps to Reproduce the Problem
Start opa run
Enter e.g. 1.1 % 1
Additional Info
OPA version 0.10.5
Linux 4.20.13 on x86_64
The text was updated successfully, but these errors were encountered:
Expected Behavior
I would expect that using floating points with the modulo operator is caught somewhere and an error is raised. This is similar to what happens if you e.g. divide by zero:
Actual Behavior
The process panics:
Steps to Reproduce the Problem
opa run
1.1 % 1
Additional Info
The text was updated successfully, but these errors were encountered: