solidity/test/libsolidity/syntaxTests/types/contractTypeType/members/assign_function_via_base_name_to_var.sol

15 lines
458 B
Solidity

contract A {
function f() external {}
function g() external pure {}
}
contract B is A {
function h() external {
function() external f = A.f;
function() external pure g = A.g;
}
}
// ----
// TypeError: (133-160): Type function A.f() is not implicitly convertible to expected type function () external.
// TypeError: (170-202): Type function A.g() pure is not implicitly convertible to expected type function () pure external.