solidity/test/libsolidity/semanticTests/variables/public_state_overridding.sol

20 lines
255 B
Solidity
Raw Normal View History

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