This commit is contained in:
Daniel Kirchner
2022-03-02 17:07:11 +01:00
parent 290b1c3a90
commit 93dd8ad553
24 changed files with 162 additions and 0 deletions
@@ -0,0 +1,25 @@
contract C {
constructor(uint256 x) {
assembly { x := 4 }
/// @solidity memory-safe-assembly
assembly { mstore(0, 0) }
}
function f() public pure {
assembly { mstore(0,0) }
}
}
contract D {
constructor() {
assembly { mstore(0,0) }
}
function f(uint256 x) public pure {
assembly { x := 4 }
/// @solidity memory-safe-assembly
assembly { mstore(0, 0) }
}
}
// ----
// :C(creation) true
// :C(runtime) false
// :D(creation) false
// :D(runtime) true