> On Jul 28, 2018, at 2:03 AM, Sven Barth via fpc-pascal 
> <fpc-pascal@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

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to