Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2010-06

method renaming

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

spir

Hello,

Is it possible to rename a method in a subclass (with or without overriding); for instance because the new name makes more sense in the subclass?

In my case, the situation is a bit different: a single method splits into two methods in a subclass. One is equivalent to the inherited one, but really would benefit of a new name because of the existence of the second one: FuncA vs FuncB2. Instead, in the superclass, it makes no sense to call it FuncA.

Denis
________________________________

vit esse estrany ☣

spir.wikidot.com

Jonas Maebe
to spir
spir wrote
Is it possible to rename a method in a subclass (with or without overriding); for instance because the new name makes more sense in the subclass?

No, it is not. You can however obviously add a new method that calls the old one.

Jonas