3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-08 18:31:49 +00:00

in check method, as_ast() call fails when True passed as assumption (#4550)

This commit is contained in:
pinzaghi 2020-06-29 18:59:10 +02:00 committed by GitHub
parent eaffe46468
commit aec8000bda
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6670,11 +6670,12 @@ class Solver(Z3PPObject):
>>> s.check()
unknown
"""
s = BoolSort(self.ctx)
assumptions = _get_args(assumptions)
num = len(assumptions)
_assumptions = (Ast * num)()
for i in range(num):
_assumptions[i] = assumptions[i].as_ast()
_assumptions[i] = s.cast(assumptions[i]).as_ast()
r = Z3_solver_check_assumptions(self.ctx.ref(), self.solver, num, _assumptions)
return CheckSatResult(r)