Open trocher opened 3 months ago
vyper --version
When having x ** y folded, if x == 0 or x == 1, the compiler will crash.
x ** y
x == 0 or x == 1
See:
https://github.com/vyperlang/vyper/blob/6d4c09cda518ffce81a9a76f822059fdce16cdfb/vyper/ast/nodes.py#L1105-L1106
@external def foo()->uint256: return 1**2
ZeroDivisionError: float division by zero
@external def foo()->uint256: return 0**2
ValueError: math domain error
Version Information
vyper --version
OR linkable commit hash vyperlang/vyper@commitish): 0.4.0rc3+commit.6d4c09cdIssue description
When having
x ** y
folded, ifx == 0 or x == 1
, the compiler will crash.See:
https://github.com/vyperlang/vyper/blob/6d4c09cda518ffce81a9a76f822059fdce16cdfb/vyper/ast/nodes.py#L1105-L1106
POC