[fpc-devel] Managed Types, Undefined Bhaviour
nc-gaertnma at netcologne.de
Fri Jun 29 19:40:35 CEST 2018
On Fri, 29 Jun 2018 19:15:00 +0200
Martok <listbox at martoks-place.de> wrote:
> Am 29.06.2018 um 16:37 schrieb Thorsten Engler:
> > The specific functions that implement an interface get baked into the class at the moment when the interface is defined as part of the class. This results in important differences in behaviour, depending if methods (in the class) are defined as virtual or not, and if a derived class redeclares an interface already declared on an ancestor or not.
> Okay, then why does the calling convention change matters so much?
The compiler searches interface methods in the class via the method
signature, which includes the calling convention.
Same as Delphi.
And same as Delphi, FPC does not give a hint if there is an overload
with a different calling convention. I wish there would be.
> [...] COM interface methods can't logically not be virtual,
I think you are confusing things here. They can be virtual or not
virtual in COM and CORBA.
More information about the fpc-devel