solidity/test/libsolidity/syntaxTests/immutable/inheritance_virtual_modifiers.sol
2023-07-14 15:29:32 +02:00

20 lines
257 B
Solidity

contract B {
uint immutable x;
constructor() readX {
x = 3;
}
modifier readX() virtual {
_; f(3);
}
function f(uint a) internal pure {}
}
contract C is B {
modifier readX() override {
_; f(x);
}
}