[fpc-pascal] access violation?
Ryan Joseph
ryan at thealchemistguild.com
Mon Jul 30 17:33:13 CEST 2018
> On Jul 28, 2018, at 2:03 AM, Sven Barth via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
>
> The method you provided below would not fail anyway, because it doesn't dereference Self. If you'd however access for example a field of your class then a check should be inserted inside the method. For some reason it isn't however and *that* is the bug.
Just getting back to this now.
Thanks for the description, I didn’t know FPC behaved that way but it’s good to know.
However, I’ve never had a use for this (outside of calling Free as I learned and the way I’ve always programmed Pascal, accessing nil is an error or undefined behavior so I avoid it meticulously.
How can I disable this so calling a method on nil gives an error?
Regards,
Ryan Joseph
More information about the fpc-pascal
mailing list