What I observe is that a - b + c is equivalent to ...
# spicedb
j
and
-
actually has higher: here
a - b + c
means
(a - b) + c
s
Ah. I misread the system visualization. It's consistent with what you described. However the evaluation seems to treat
a - b + c
as
a - (b + c)
? Otherwise the assertions should pass?
j
good point
that's not correct
I'll file an issue
s
Thanks Joey.
@Joey saw the issue https://github.com/authzed/spicedb/issues/1572. So it's actually the visualizer is incorrect. I guess that means + does have higher precedence over -? What about &?
j
I'd recommend using parens regardless
if they aren't necessary, the formatter will remove them
s
Gotcha. Thanks!
2 Views