Re: [fpc-devel] override works, even if result type changed?

2014-02-23 Thread Flávio Etrusco
On Sun, Feb 23, 2014 at 1:56 PM, Martin Frb wrote: > Just found that the below works. > > Note, that the result type of "a" (overridden) is different. > Well, TFoo2 will always satisfy the needs of TFoo, so it seems save. I still > found it surprising. Is it intended? > > > program Project1; > typ

[fpc-devel] override works, even if result type changed?

2014-02-23 Thread Martin Frb
Just found that the below works. Note, that the result type of "a" (overridden) is different. Well, TFoo2 will always satisfy the needs of TFoo, so it seems save. I still found it surprising. Is it intended? program Project1; type TFoo= class public function a: TFoo; virtual; end;