On 15/7/2016 1:31 μμ, Juha Manninen wrote:
On Fri, Jul 15, 2016 at 12:51 PM, Maciej Izak <[email protected]> wrote:
constructor TDesignFormData.Create(AForm: TCustomForm);
begin
FForm := AForm as IDesignedForm; // won't work anymore. FForm is an
interface
I have not studied the context of this code but to me it looks suspicious.
If such a typecast is needed then something is wrong in the code's design.
An obvious idea is to change the AForm's type to IDesignedForm.
My intuition says that Sven's commit only revealed some fishy code in
sparta dockedformeditor.
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 ?
regards,
--
Dimitrios Chr. Ioannidis
_______________________________________________
fpc-devel maillist - [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel