Skip to content

Commit

Permalink
test the vyperlang#4072 issue's case
Browse files Browse the repository at this point in the history
  • Loading branch information
harkal committed Jun 12, 2024
1 parent 21f7172 commit e63333b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/functional/codegen/venom/test_double_eval.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

def test_double_eval_pop(get_contract):
code = f"""
m: HashMap[uint256, String[33]]
@external
def foo() -> uint256:
x: DynArray[uint256, 32] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
self.m[x.pop()] = "Hello world"
return len(x)
"""

c = get_contract(code)
assert c.foo() == 31

0 comments on commit e63333b

Please sign in to comment.