[Gambas-user] JIT crash

Jussi Lahtinen jussi.lahtinen at gmail.com
Mon Oct 8 01:32:29 CEST 2018


OK, I thought it is effectively the same as overriding a property. I use it
also in "real code", where I do not need setter & getters. And yes, I do
know the OO philosophy about them, but I disagree. For me it's just huge
amount of useless code.
But yes, I think the compiler should raise error.

Jussi

On Mon, Oct 8, 2018 at 1:51 AM Benoît Minisini <g4mba5 at gmail.com> wrote:

> Le 03/10/2018 à 14:25, Jussi Lahtinen a écrit :
> > There is the "null object" error, which happens only when JIT is
> > enabled. See the attachment.
> >
> > Jussi
> >
>
> It comes from the fact that a public variable is declared in a child
> class with the same name as in the parent class.
>
> It works by luck in the interpreter, but not in the JIT compiler.
>
> I think I should forbid that. Having two different variables with the
> same name is obviously a design error. It's different from overriding a
> method, a property or a constant, which is perfectly useful.
>
> --
> Benoît Minisini
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20181008/735f2559/attachment.html>


More information about the User mailing list