mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
22 lines
322 B
Solidity
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
|