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

Juha Manninen juha.manninen62 at gmail.com
Fri Jul 15 13:10:48 CEST 2016

On Fri, Jul 15, 2016 at 2:01 PM, Dimitrios Chr. Ioannidis
<d.ioannidis at nephelae.eu> wrote:
> AFAIU, unless the AForm  ( a TCustomForm descendant which explicitly list
> IDesignedForm  ) doesn't has the IDesignedForm in it's list of supported
> interfaces, then it's a bug in the compiler, because, AFAIU, the compiler is
> relying on this in order to implement the as cast, no ?

Ok, true. Technically the compiler should accept such a cast.

Code design is another issue which should not be mixed here, although
I still think there is something fishy in that specific use case. It
could be implemented differently.


More information about the fpc-devel mailing list