<div dir="ltr"><div>OK, it's clear now.</div><div><br></div><div><br></div><div>Jussi<br></div></div><br><div class="gmail_quote"><div dir="ltr">On Sat, Oct 20, 2018 at 2:56 PM Benoît Minisini <<a href="mailto:g4mba5@gmail.com" target="_blank">g4mba5@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Le 18/10/2018 à 04:20, Jussi Lahtinen a écrit :<br>
> If I understand correctly, overriding like this should not be allowed ( <br>
> <a href="http://gambaswiki.org/wiki/doc/object-model#t19" rel="noreferrer" target="_blank">http://gambaswiki.org/wiki/doc/object-model#t19</a> ):<br>
> Property y As Object --> Property y As TestClass1<br>
> <br>
> But no error is raised. See the attachment (baseclass & childclass).<br>
> <br>
> <br>
> Jussi<br>
> <br>
<br>
The documentation is not accurate. The datatype of the child must not be <br>
the same as the parent. It must be compatible.<br>
<br>
- If the datatypes are not objects, then both datatypes must be the same.<br>
<br>
- If the datatypes are objects, then either the parent must be 'Object', <br>
or the child datatype must inherit the parent datatype.<br>
<br>
Except for public variables where inheritance is now forbidden.<br>
<br>
This is not a JIT-related problem by the way.<br>
<br>
Regards,<br>
<br>
-- <br>
Benoît Minisini<br>
<br>
----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net" rel="noreferrer" target="_blank">https://www.hostsharing.net</a> ]----<br>
</blockquote></div>