Skip to main contentModule immutable
Source use super::UnchangedStateVariables; ๐ use crate::linter::LateLintPass; ๐ use crate::linter::LintContext; ๐ use crate::sol::Severity; ๐ use crate::sol::SolLint; ๐ use crate::sol::analysis::for_each_lhs_var; ๐ use crate::sol::analysis::is_contract_cast; ๐ use crate::sol::analysis::loop_stmts; ๐ use crate::sol::analysis::write_target; ๐ use solar::ast::ContractKind; ๐ use solar::ast::ElementaryType; ๐ use solar::interface::data_structures::Never; ๐ use solar::interface::kw; ๐ use solar::interface::sym; ๐ use solar::sema::Gcx; ๐ use solar::sema::hir; ๐ use solar::sema::hir::Expr; ๐ use solar::sema::hir::ExprKind; ๐ use solar::sema::hir::ItemId; ๐ use solar::sema::hir::Stmt; ๐ use solar::sema::hir::StmtKind; ๐ use solar::sema::hir::TypeKind; ๐ use solar::sema::hir::VariableId; ๐ use solar::sema::hir::Visit as _; ๐ use std::collections::HashSet; ๐ use std::ops::ControlFlow; ๐
- WriteCollector ๐
- Collects every variable at the root of an assigned, deleted or incremented lvalue.
- COULD_BE_CONSTANT
- COULD_BE_IMMUTABLE
- has_assembly_or_unknown ๐
- is_compile_time_constant ๐
- is_constant_call ๐
- Type casts (
address(0xCAFE), IToken(addr)) and the hashing / modular arithmetic builtins.