opshin
opshin copied to clipboard
Recursion error when automatically converting bool to int
Describe the bug
File "test.py", line 4
return 1 + (a < b)
^
RecursionError: maximum recursion depth exceeded in comparison
Note that opshin errors may be overly restrictive as they aim to prevent code with unintended consequences.
To Reproduce
$ cat test.py
from opshin.prelude import *
def validator(a: bool, b: bool) -> int:
return 1 + (a < b)
$ opshin build test.py
Expected behavior Should not give recursion error.