Skip to main content

Module tautological_compare

Module tautological_compare 

Source

Staticsยง

TAUTOLOGICAL_COMPARE

Functionsยง

cast_elem_type ๐Ÿ”’
If callee is an elementary-type name used as a cast (uint256, address, bytesN, โ€ฆ), returns that type, else None.
exprs_equal ๐Ÿ”’
Structural equality for the side-effect-free expressions a self-comparison can involve: identifiers, member access, indexing (by an equal index), binary operations, elementary-type casts, payable(...), the pure unary operators (-, !, ~), and the ternary c ? a : b. Anything else (notably arbitrary calls, which may return different values or have side effects, and the ++/-- unary ops, which mutate) is treated as unequal, so the lint never fires on a comparison whose two sides could legitimately differ.
literals_equal ๐Ÿ”’
operand_is_udvt ๐Ÿ”’
Returns true if exprโ€™s type is a user-defined value type (UDVT).
opt_exprs_equal ๐Ÿ”’