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

bvs have to be expressions

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2022-01-10 12:38:25 -08:00
parent 21feefeac5
commit d3bc11dd3a

View file

@ -10697,7 +10697,8 @@ def CharVal(ch, ctx=None):
return _to_expr_ref(Z3_mk_char(ctx.ref(), ch), ctx)
def CharFromBv(ch, ctx=None):
ch = _coerce_char(ch, ctx)
if not is_expr(ch):
raise Z3Expression("Bit-vector expression needed")
return _to_expr_ref(Z3_mk_char_from_bv(ch.ctx_ref(), ch.as_ast()), ch.ctx)
def CharToBv(ch, ctx=None):