mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Provide selector for some internal functions.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
contract B {
|
||||
function g() public {}
|
||||
}
|
||||
contract C is B {
|
||||
bytes4 constant s2 = B.g.selector;
|
||||
function f() external pure returns (bytes4) { return s2; }
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f() -> 0xe2179b8e00000000000000000000000000000000000000000000000000000000
|
||||
Reference in New Issue
Block a user