Closed fore5fire closed 8 months ago
According to the CEL spec, the CEL runtime supports implicit comparisons of different numeric types: See https://github.com/google/cel-spec/blob/master/doc/langdef.md#equality and https://github.com/google/cel-spec/blob/master/doc/langdef.md#numbers
From what I can tell, cel-rust doesn't have a separate checker step which would reject these implicit comparisons when static types are available, so I just implemented the spec's runtime behavior of always allowing them.
I also added functions to explicitly cast to ints and uints per https://github.com/google/cel-spec/blob/master/doc/langdef.md#list-of-standard-definitions
According to the CEL spec, the CEL runtime supports implicit comparisons of different numeric types: See https://github.com/google/cel-spec/blob/master/doc/langdef.md#equality and https://github.com/google/cel-spec/blob/master/doc/langdef.md#numbers
From what I can tell, cel-rust doesn't have a separate checker step which would reject these implicit comparisons when static types are available, so I just implemented the spec's runtime behavior of always allowing them.
I also added functions to explicitly cast to ints and uints per https://github.com/google/cel-spec/blob/master/doc/langdef.md#list-of-standard-definitions