diff --git a/tests/parser/syntax/test_immutables.py b/tests/parser/syntax/test_immutables.py index 6f7fce29cb..83d744d004 100644 --- a/tests/parser/syntax/test_immutables.py +++ b/tests/parser/syntax/test_immutables.py @@ -40,6 +40,16 @@ def __init__(): def set_value(_value: uint256): VALUE = _value """, + # modifying immutable multiple times in constructor + """ +VALUE: immutable(uint256) + +@external +def __init__(_value: uint256): + VALUE = _value * 3 + VALUE = VALUE + 1 + """ + ] @@ -88,7 +98,7 @@ def get_value() -> {typ}: @external def __init__(_value: uint256): VALUE = _value * 3 - VALUE = VALUE + 1 + x: uint256 = VALUE + 1 """ ]