solidity/test/libsolidity/semanticTests/inheritance/address_overload_resolution.sol
Daniel Kirchner 44da8507b1 Change default EVM version to Shanghai.
Co-authored-by: Rodrigo Q. Saramago <rodrigoqsaramago@gmail.com>
2023-05-08 16:34:23 +02:00

29 lines
505 B
Solidity

contract C {
function balance() public returns (uint256) {
return 1;
}
function transfer(uint256 amount) public returns (uint256) {
return amount;
}
}
contract D {
function f() public returns (uint256) {
return (new C()).balance();
}
function g() public returns (uint256) {
return (new C()).transfer(5);
}
}
// ----
// f() -> 1
// gas irOptimized: 77051
// gas legacy: 112260
// g() -> 5
// gas irOptimized: 77106
// gas legacy: 112796