[fpc-devel] Sven commit (r34087) breaks casting an object to an interface

Dimitrios Chr. Ioannidis d.ioannidis at nephelae.eu
Fri Jul 15 13:13:46 CEST 2016

On 15/7/2016 12:51 μμ, Maciej Izak wrote:
> Hi,
> change in mentioned FPC trunk r34087 totally breaks sparta 
> dockedformeditor package (and probably many other things) see:
> http://forum.lazarus.freepascal.org/index.php/topic,27211.msg216064.html#msg216064
> http://bugs.freepascal.org/view.php?id=30377
> please revert mentioned commit (what is sense for such change?).
> For example problem exist in sparta_MainIDE.pas module:
> === code begin ===
> constructor TDesignFormData.Create(AForm: TCustomForm);
> begin
>   FForm := AForm as IDesignedForm; // won't work anymore. FForm is an 
> interface
> === code end ===

Just looked in the sources a little bit, and I saw that you use 
interface inheritance.

Never used that and searching on the net found the following 

The change is for Delphi compatibility maybe ?

Anyway, this is out of my league ....

Dimitrios Chr. Ioannidis

More information about the fpc-devel mailing list