solidity/test/libsolidity/semanticTests/inlineAssembly/external_function_pointer_address.sol

18 lines
404 B
Solidity
Raw Normal View History

contract C {
function testFunction() external {}
function testYul() public returns (address adr) {
function() external fp = this.testFunction;
assembly {
adr := fp.address
}
}
function testSol() public returns (address) {
return this.testFunction.address;
}
}
// ----
// testYul() -> 0x0fdd67305928fcac8d213d1e47bfa6165cd0b87b
// testSol() -> 0x0fdd67305928fcac8d213d1e47bfa6165cd0b87b