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.
overloadedallows to have few the same named methods, but with different parameter sets, in a single class / interface.Testmethod. With this single method there is no need foroverloaded. But you can introduce, if you need, additionalTestmethods with differrent parameter sets.overridedirective …