[fpc-devel] Black List of examples that FPC won't compile.

hinst hinstance at yandex.ru
Mon Jan 27 12:21:45 CET 2014



27.01.2014, 11:30, "Maciej Izak" <hnb.code at gmail.com>:
> 2014-01-26 Florian Klämpfl <florian at freepascal.org>
>> You mean somebody considers it as a bug *and* fixes it ;)?
>
> It would be best :). If no one want fix, maybe I will do patch later (in my TODO list is much better Generics.* and patch for Lazarus...). But what is the point of doing a patch if only I recognize this as a bug?
>
> Regards,
> HNB
>
> ,
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

I suggest a modification to your example:
Please observe this: http://pastebin.com/9axN51QE
If you declare a base class with "reintroduced" constructor (like I suggest) then you may prevent FreePascal compiler from "seeing" TObject.Create constructor. Therefore it will determine which constructor to call; so you won't get a compiler error in this example. I think that the fact that it can not determine which constructor to call when TObject.Create overloaded constructor is in scope is just logical; it should work this way. However if Delphi compiler uses a different kind of logic here then perhaps we can call it a bug; but only for Delphi mode; while ObjFPC mode should be left unchanged considering this particular problem. 



More information about the fpc-devel mailing list