solidity/test/libsolidity/semanticTests/array/delete_memory_array.sol
2020-07-08 13:10:33 +02:00

18 lines
294 B
Solidity

contract C {
function len() public returns (uint ret) {
uint[] memory data = new uint[](2);
data[0] = 234;
data[1] = 123;
delete data;
assembly {
ret := mload(data)
}
}
}
// ====
// compileViaYul: also
// ----
// len() -> 0