vyperlang / vyper

Pythonic Smart Contract Language for the EVM
https://vyperlang.org
Other
4.84k stars 788 forks source link

Imprecise Assertion in `Expr.handle_binop()` #4101

Open ritzdorf opened 4 months ago

ritzdorf commented 4 months ago

Version Information

In Expr.handle_binop(), the assertion assert is_numeric_type(left.typ) is performed after the handling of vy_ast.LShift and vy_ast.RShift, which are only defined for numeric types. The assertion could be moved before the handling of these operators to be more precise.