mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
27 lines
815 B
Solidity
27 lines
815 B
Solidity
|
contract C {
|
||
|
uint256 public x;
|
||
|
|
||
|
function f() public pure returns (bytes4) {
|
||
|
return this.f.selector;
|
||
|
}
|
||
|
|
||
|
function g() public returns (bytes4) {
|
||
|
function () pure external returns (bytes4) fun = this.f;
|
||
|
return fun.selector;
|
||
|
}
|
||
|
|
||
|
function h() public returns (bytes4) {
|
||
|
function () pure external returns (bytes4) fun = this.f;
|
||
|
return fun.selector;
|
||
|
}
|
||
|
|
||
|
function i() public pure returns (bytes4) {
|
||
|
return this.x.selector;
|
||
|
}
|
||
|
}
|
||
|
// ----
|
||
|
// f() -> 0x26121ff000000000000000000000000000000000000000000000000000000000
|
||
|
// g() -> 0x26121ff000000000000000000000000000000000000000000000000000000000
|
||
|
// h() -> 0x26121ff000000000000000000000000000000000000000000000000000000000
|
||
|
// i() -> 0x0c55699c00000000000000000000000000000000000000000000000000000000
|