<div dir="auto"><div class="gmail_quote" dir="auto"><div dir="ltr">Ryan Joseph <<a href="mailto:ryan@thealchemistguild.com">ryan@thealchemistguild.com</a>> schrieb am Mo., 30. Juli 2018, 18:05:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
> On Jul 28, 2018, at 2:03 AM, Sven Barth via fpc-pascal <<a href="mailto:fpc-pascal@lists.freepascal.org" target="_blank" rel="noreferrer">fpc-pascal@lists.freepascal.org</a>> wrote:<br>
> <br>
> 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.<br>
<br>
Just getting back to this now.<br>
<br>
Thanks for the description, I didn’t know FPC behaved that way but it’s good to know.<br>
<br>
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. <br>
<br>
How can I disable this so calling a method on nil gives an error?<br></blockquote></div><div dir="auto"><br></div><div dir="auto">If the method doesn't access Self then there is nothing you can do. </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div class="gmail_quote" dir="auto"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div></div>