Can you please clarify your question as you mention an error using override yet the example you show is using redfine and not override.
The redefine should work OK as this simply hides the method implementation in the parent class and redefines it using the new definition.
Using override is different and the rules state that if you use override then the method must be defined as public and hence the error that you are seeing.
Thanks.