Ryan Joseph <r...@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@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

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

Reply via email to