Describe the bug
If you have multiple typed elements in a container, we are currently only resolving the type based on the first element. This leads to incorrect behaviour.
To Reproduce
def g():
u = csp.const([1,'abc']) # resolved as typing.List[int]
csp.print('u', u)
print(csp.run(g, starttime=datetime(2020,1,1), endtime=timedelta()))
Gives
TypeError: Conversions.h:fromPython<long int>:222:TypeError: Invalid int type, expected long (int) got str
Expected behavior
The code above should print [1, 'abc']
Error Message
See above
Runtime Environment
0.0.5
3.12.4 | packaged by conda-forge | (main, Jun 17 2024, 10:23:07) [GCC 12.3.0]
linux
Additional context
Describe the bug
If you have multiple typed elements in a container, we are currently only resolving the type based on the first element. This leads to incorrect behaviour.
To Reproduce
Gives
Expected behavior
The code above should print
[1, 'abc']Error Message
See above
Runtime Environment
0.0.5
3.12.4 | packaged by conda-forge | (main, Jun 17 2024, 10:23:07) [GCC 12.3.0]
linux
Additional context