solidity/test/libsolidity/syntaxTests/inlineAssembly/invalid/internal_function_pointer_address.sol
2022-04-01 23:41:18 -05:00

19 lines
573 B
Solidity

contract C {
function testFunction() internal {}
function testYul() public returns (address adr) {
function() internal fp = testFunction;
uint selectorValue = 0;
assembly {
adr := fp.address
}
}
function testSol() public returns (address) {
return testFunction.address;
}
}
// ----
// TypeError 8533: (193-203='fp.address'): Only Variables of type external function pointer support ".selector" and ".address".
// TypeError 9582: (267-287='testFunction.address'): Member "address" not found or not visible after argument-dependent lookup in function ().