[fpc-pascal] Abstract classes ignored

Sven Barth pascaldragon at googlemail.com
Sun Apr 18 13:00:49 CEST 2021


Am 18.04.2021 um 04:34 schrieb Ryan Joseph via fpc-pascal:
>
>> On Apr 17, 2021, at 3:09 PM, Sven Barth <pascaldragon at googlemail.com> wrote:
>>
>> The compiler will generate a warning in case you instantiate a class that is abstract or has abstract methods. You can escalate these warnings to errors if you need:
> It's probably not practical to put that warning into all potential files but a warning is still probably good enough as a reminder. It's curious though why it's not an error by default, because if the class is abstract and you instantiate it and try to use it things are going to fail anyways so why does the compiler allow it in the first place?

As I have said: Delphi compatibility.

Regards,
Sven


More information about the fpc-pascal mailing list