mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Sort tests.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
contract D {
|
||||
function f() public pure returns (uint256) {
|
||||
return 7;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
contract C {
|
||||
function diff() public pure returns (uint256 remainder) {
|
||||
bytes memory a = type(D).creationCode;
|
||||
bytes memory b = type(D).runtimeCode;
|
||||
assembly {
|
||||
remainder := mod(sub(b, a), 0x20)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ----
|
||||
// diff() -> 0 # This checks that the allocation function pads to multiples of 32 bytes #
|
||||
Reference in New Issue
Block a user