solidity/test/libsolidity/memoryGuardTests/constructor_safe_deploy_unsafe.sol
Daniel Kirchner 6b6e163be5 Tests.
2022-03-02 16:42:28 +01:00

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