solidity/test/libsolidity/semanticTests/intheritance/base_access_to_function_type_variables.sol
2020-03-19 14:42:25 +01:00

22 lines
322 B
Solidity

contract C {
function() returns (uint256) internal x;
function set() public {
C.x = g;
}
function g() public pure returns (uint256) {
return 2;
}
function h() public returns (uint256) {
return C.x();
}
}
// ----
// g() -> 2
// h() -> FAILURE
// set() ->
// h() -> 2