I'm currently investigating the logic conformance tests. Among them, the test case for error_right includes the expression:
It appears that the expected error for this case is:
test {
name: "error_right"
expr: "true && 1/0 != 0"
eval_error: {
errors: { message: "no matching overload" }
}
}
Source: logic.textproto#L86
From my understanding, the expression 1/0 would raise a division by zero error, which should be propagated first.
So I don't quite understand why a no matching overload error is expected instead.
When I tried executing a similar expression using cel-go (v0.25.0), it returned a division by zero error.
How should I interpret this conformance test case?
package main
import (
"fmt"
"log"
"github.com/google/cel-go/cel"
)
func main() {
env, err := cel.NewEnv()
if err != nil {
log.Fatalf("error: %v", err)
}
ast, iss := env.Compile(`true && 1/0 != 0`)
if iss.Err() != nil {
log.Fatalf("compile error: %v", iss.Err())
}
prg, err := env.Program(ast)
if err != nil {
log.Fatalf("program error: %v", err)
}
out, _, err := prg.Eval(map[string]interface{}{})
if err != nil {
log.Fatalf("runtime error: %v", err)
}
fmt.Println(out)
}
I'm currently investigating the
logicconformance tests. Among them, the test case forerror_rightincludes the expression:It appears that the expected error for this case is:
test { name: "error_right" expr: "true && 1/0 != 0" eval_error: { errors: { message: "no matching overload" } } }Source: logic.textproto#L86
From my understanding, the expression
1/0would raise adivision by zeroerror, which should be propagated first.So I don't quite understand why a
no matching overloaderror is expected instead.When I tried executing a similar expression using
cel-go (v0.25.0), it returned adivision by zeroerror.How should I interpret this conformance test case?