Skip to content

Commit

Permalink
test: multiple assignments blocked
Browse files Browse the repository at this point in the history
  • Loading branch information
skellet0r committed Oct 4, 2021
1 parent 9ddf6df commit 71b18a5
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/parser/syntax/test_immutables.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""

]


Expand Down Expand Up @@ -88,7 +98,7 @@ def get_value() -> {typ}:
@external
def __init__(_value: uint256):
VALUE = _value * 3
VALUE = VALUE + 1
x: uint256 = VALUE + 1
"""
]

Expand Down

0 comments on commit 71b18a5

Please sign in to comment.