Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TilakMaddy committed Dec 13, 2024
1 parent 16be6a6 commit c18d178
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/sema/src/ast_passes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ impl<'ast> Visit<'ast> for AstValidator<'_, 'ast> {
}
for item in contract.body.iter() {
if let ast::ItemKind::Variable(var) = &item.kind {
if !var.mutability.is_some_and(|m| m == ast::VarMut::Constant) {
if !var.mutability.is_some_and(|m| m.is_constant()) {
self.dcx()
.err("library cannot have non-constant state variable")
.span(var.span)
Expand Down

0 comments on commit c18d178

Please sign in to comment.