Closed joelanford closed 9 months ago
I expected this to work correctly:
if err := solution.Error(); err != nil { log.Println(err) }
In reality, this code always logs "constraints not satisfiable", even the the solution was SAT.
To handle this correctly, I had to use this code instead:
unsat := deppy.NotSatisfiable{} if errors.As(solution.Error(), &unsat); len(unsat) > 0 { log.Println(unsat.Error()) }
We should fix solution.Error() to return an untyped nil error if the solution was SAT.
solution.Error()
nil
I expected this to work correctly:
In reality, this code always logs "constraints not satisfiable", even the the solution was SAT.
To handle this correctly, I had to use this code instead:
We should fix
solution.Error()
to return an untypednil
error if the solution was SAT.