[fpc-pascal] access violation?

Sven Barth pascaldragon at googlemail.com
Wed Aug 1 07:46:03 CEST 2018


Ryan Joseph <ryan at thealchemistguild.com> schrieb am Di., 31. Juli 2018,
18:15:

>
>
> > On Jul 30, 2018, at 11:08 PM, Sven Barth via fpc-pascal <
> fpc-pascal at lists.freepascal.org> wrote:
> >
> > If the method doesn't access Self then there is nothing you can do.
>
> Is this something the compiler team would be interested in adding? I’d
> like to get an error when calling methods on nil. It’s seems like pretty
> basic type safety stuff to me.
>

No, because calling methods like Free would break as well and there is
enough code out there that relies on that behavior. Also for methods that
don't access Self it really is not important whether Self is valid or not.
And for the other cases (which are the majority btw) there is functionality
for that even if it is currently buggy.

Regards,
Sven

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20180801/5bbd0496/attachment.html>


More information about the fpc-pascal mailing list