Say I have this contract:
contract Foo { uint256 public foo; function setFoo(uint256 _foo) public { foo = _foo; } function setFooToZero() public { foo = 0; } } And I want to inherit from it like so:
contract Bar is Foo { function setFooToZero() public {} } This way, setFooToZero gets updated to a function that does nothing, but is there a way of disabling it? Of not having it in the bytecode of the contract at all?
Foo(seriously). Why are you inheriting from a contract that has code in it you don't actually want? See also diligence.consensys.net/posts/2019/06/… for a more general rant about inheritance.