[Gambas-user] Bug with conversion?

Jussi Lahtinen jussi.lahtinen at gmail.com
Wed Feb 10 21:13:50 CET 2021


Umm... I guess the types are not known when the array is initialized?

Jussi

On Wed, Feb 10, 2021 at 10:07 PM Jussi Lahtinen <jussi.lahtinen at gmail.com>
wrote:

> There seems to be a case where Gambas does extra conversions or maybe I'm
> missing something. See attachment.
>
> Look at the improved ArrayBoundsTest() function.
>
> From these lines:
> Debug gb.Integer
> Debug TypeOf(iMyArray1.Bounds.Count);; TypeOf(iMyArray2.Bounds.Count);;
> TypeOf(iMyArray3.Bounds.Count);; TypeOf(iMyArray4.Bounds.Count)
> Debug [iMyArray1.Bounds.Count, iMyArray2.Bounds.Count,
> iMyArray3.Bounds.Count, iMyArray4.Bounds.Count]
>
> This is what I get:
> mTest.ArrayBoundsTest.2548: 4
> mTest.ArrayBoundsTest.2549: 4 4 4 4
> mTest.ArrayBoundsTest.2550: (Variant[] 0x559e6c3b9178)
>
> I would expect integer[].
>
>
> Jussi
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210210/cfec525f/attachment.htm>


More information about the User mailing list