diff --git a/tests/functional/codegen/venom/test_double_eval.py b/tests/functional/codegen/venom/test_double_eval.py new file mode 100644 index 0000000000..eadc768f9b --- /dev/null +++ b/tests/functional/codegen/venom/test_double_eval.py @@ -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 \ No newline at end of file