<div dir="ltr"><div>Phuuh... yes, my mistake. I didn't remember the unknown method.</div><div><br></div><div><br></div><div>Jussi<br></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Aug 23, 2018 at 12:17 PM Benoît Minisini <<a href="mailto:g4mba5@gmail.com">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 23/08/2018 à 03:22, Jussi Lahtinen a écrit :<br>
> The sub is called with TestClass2 even when TestClass1 is asked. Also <br>
> this way there is no error message at all!<br>
> <br>
> Private Sub Crash(o1 As TestClass1)<br>
> <br>
>   Dim ii As Integer = o1.x<br>
>   Dim jj As Integer = o1.y()<br>
> <br>
> End<br>
> <br>
> Jussi<br>
> <br>
<br>
Of course: as you define an _unknown method in TestClass2, this method <br>
is returned when accessing an unknown symbol (hence the error when you <br>
don't call it).<br>
<br>
I will try to see if I can make the error more explicit by detecting <br>
that special case.<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>