solidity/test/libsolidity/semanticTests/variables/public_state_overridding.sol
2019-12-05 12:48:52 +00:00

20 lines
226 B
Solidity

contract A
{
function test() external virtual returns (uint256)
{
return 5;
}
}
contract X is A
{
uint256 public override test;
function set() public { test = 2; }
}
// ----
// test() -> 0
// set() ->
// test() -> 2