I'm a little bit confused on interfaces in Delphi, so I'm asking you about this. An interface can be 'associated' with an abstract class. (It does not implement the methods declared on it.) All the methods declared on it are implemented in the class/classes which is/are implementing the interface.
So, why then is it allowed to have the overload directive on the method declaration of an interface?
type
IFoo = interface
function Test : String; overload;
end;
Compiler is quiet on this.
overloaded
allows to have few the same named methods, but with different parameter sets, in a single class / interface. Test
method. With this single method there is no need for overloaded
. But you can introduce, if you need, additional Test
methods with differrent parameter sets.override
directive ...If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With