mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
21 lines
363 B
Solidity
21 lines
363 B
Solidity
contract test {
|
|
struct testStruct {
|
|
uint256 m_value;
|
|
}
|
|
mapping(uint256 => testStruct) campaigns;
|
|
|
|
constructor() {
|
|
campaigns[0].m_value = 2;
|
|
}
|
|
|
|
function deleteIt() public returns (uint256) {
|
|
delete campaigns[0];
|
|
return campaigns[0].m_value;
|
|
}
|
|
}
|
|
|
|
// ====
|
|
// compileViaYul: also
|
|
// ----
|
|
// deleteIt() -> 0
|