solidity/test/libsolidity/memoryGuardTests/dialectString/multiple_contracts.sol
Daniel Kirchner 93dd8ad553 Tests.
2022-03-02 17:07:11 +01:00

24 lines
497 B
Solidity

contract C {
constructor(uint256 x) {
assembly { x := 4 }
assembly "evmasm" ("memory-safe") { 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 }
assembly ("memory-safe") { mstore(0, 0) }
}
}
// ----
// :C(creation) true
// :C(runtime) false
// :D(creation) false
// :D(runtime) true