summaryrefslogtreecommitdiff
path: root/src/api
diff options
context:
space:
mode:
authoryoni206 <yoni206@users.noreply.github.com>2021-05-28 13:28:56 -0700
committerGitHub <noreply@github.com>2021-05-28 20:28:56 +0000
commit40089fc79491a0608f36e6af9db69d2c12c37e3e (patch)
tree84cbabd73236653c64c19bd779ce6d2ad1ad9182 /src/api
parent15d38800b9f493fcf4573160b420f0ab9563b4a8 (diff)
Python API: bugfix + translating tests from cpp unit tests (#6559)
This PR fixes an issue in the python API for datatypes, and also introduces tests translated from https://github.com/cvc5/cvc5/blob/master/test/unit/api/datatype_api_black.cpp The next PR will translate more tests and will also introduce missing functions in the python API for datatypes.
Diffstat (limited to 'src/api')
-rw-r--r--src/api/python/cvc5.pxi2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/python/cvc5.pxi b/src/api/python/cvc5.pxi
index 2fac78552..b2942e0b3 100644
--- a/src/api/python/cvc5.pxi
+++ b/src/api/python/cvc5.pxi
@@ -178,7 +178,7 @@ cdef class DatatypeConstructor:
if isinstance(index, int) and index >= 0:
ds.cds = self.cdc[(<int?> index)]
elif isinstance(index, str):
- ds.cds = self.cdc[(<const string &> name.encode())]
+ ds.cds = self.cdc[(<const string &> index.encode())]
else:
raise ValueError("Expecting a non-negative integer or string")
return ds
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback