mirror of
https://github.com/Z3Prover/z3
synced 2025-04-10 19:27:06 +00:00
add parameter validation to sequence expressions
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
150c5c283d
commit
14c19fe928
|
@ -9095,6 +9095,10 @@ def _coerce_seq(s, ctx=None):
|
|||
if isinstance(s, str):
|
||||
ctx = _get_ctx(ctx)
|
||||
s = StringVal(s, ctx)
|
||||
if not is_expr(s):
|
||||
raise Z3Exception("Non-expression passed as a sequence")
|
||||
if not is_seq(s):
|
||||
raise Z3Exception("Non-sequence passed as a sequence")
|
||||
return s
|
||||
|
||||
def _get_ctx2(a, b, ctx=None):
|
||||
|
|
Loading…
Reference in a new issue