mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
18 lines
338 B
Solidity
18 lines
338 B
Solidity
contract C {
|
|
constructor() {
|
|
uint256 x;
|
|
assembly { x := 0 }
|
|
f();
|
|
}
|
|
function f() internal pure {
|
|
/// @solidity memory-safe-assembly
|
|
assembly { mstore(0, 0) }
|
|
}
|
|
function g() public pure {
|
|
assembly { mstore(0, 0) }
|
|
}
|
|
}
|
|
// ----
|
|
// :C(creation) true
|
|
// :C(runtime) false
|