vyper
vyper copied to clipboard
empty() function don't work with HashMap
Version Information
- vyper Version (output of
vyper --version
): 0.3.3 - OS: macOS
- Python Version (output of
python --version
): 2.7.16
What's your issue about?
vyper-0.3.3 error: vyper.exceptions.StructureException: HashMap can only be declared as a storage variable
contract "tests/vyper/external/storage/mappings_array_pop_delete.vy", function "n1", line 5:24
4 def n1():
---> 5 self.a.append(empty(HashMap[uint256, uint256]))
-------------------------------^
6
[13936] Failed to execute script 'vyper_compile' due to unhandled exception!
Source code:
a: DynArray[HashMap[uint256, uint256], 10]
@external
def n1():
self.a.append(empty(HashMap[uint256, uint256]))