From c92e1adf25a5095c64743067a6ce841747206ea0 Mon Sep 17 00:00:00 2001 From: Sand Bubbles Date: Mon, 4 Nov 2024 16:04:51 +0000 Subject: [PATCH] make immutables state --- tests/functional/codegen/features/decorators/test_pure.py | 1 - vyper/semantics/analysis/utils.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/functional/codegen/features/decorators/test_pure.py b/tests/functional/codegen/features/decorators/test_pure.py index 867763ccc0..b2c5a0945b 100644 --- a/tests/functional/codegen/features/decorators/test_pure.py +++ b/tests/functional/codegen/features/decorators/test_pure.py @@ -135,7 +135,6 @@ def foo() -> uint256: def test_invalid_module_immutable_access(make_input_bundle): lib1 = """ -phony: uint32 COUNTER: immutable(uint256) @deploy diff --git a/vyper/semantics/analysis/utils.py b/vyper/semantics/analysis/utils.py index 7955981244..d092675aa2 100644 --- a/vyper/semantics/analysis/utils.py +++ b/vyper/semantics/analysis/utils.py @@ -747,6 +747,6 @@ def is_stateless(module: vy_ast.Module): for i in module.body: if isinstance(i, (vy_ast.InitializesDecl, vy_ast.UsesDecl)): return False - if isinstance(i, vy_ast.VariableDecl) and not i.is_constant and not i.is_immutable: + if isinstance(i, vy_ast.VariableDecl) and not i.is_constant: return False return True