mirror of
https://github.com/Z3Prover/z3
synced 2026-02-16 22:01:44 +00:00
Suggest eval in ModelRef.__getitem__ error
This improves the previously cryptic error message. I searched multiple websites before Google AI suggested using model.eval(arr[0]) for getting solutions out of arrays.
This commit is contained in:
parent
e2486eff77
commit
1ada488cb6
1 changed files with 1 additions and 1 deletions
|
|
@ -6849,7 +6849,7 @@ class ModelRef(Z3PPObject):
|
|||
if isinstance(idx, SortRef):
|
||||
return self.get_universe(idx)
|
||||
if z3_debug():
|
||||
_z3_assert(False, "Integer, Z3 declaration, or Z3 constant expected")
|
||||
_z3_assert(False, "Integer, Z3 declaration, or Z3 constant expected. Use model.eval instead for complicated expressions")
|
||||
return None
|
||||
|
||||
def decls(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue