> On Apr 10, 2021, at 6:54 AM, Sven Barth <pascaldra...@googlemail.com> wrote:
> 
> As an additional note: if you take a look at 
> tarrayconstructornode.pass_typecheck you can see that the array type always 
> has the ado_IsConstructor set and if it contains of incompatible types the 
> ado_IsVariant is set as well. So if ado_IsVariant is *not* set, then you can 
> rely on the elementdef of the arraydef.

I checked before and here's what I got. Maybe pass_typecheck hasn't been called 
yet? If not I'll have to reproduce that code and determine how it knows the 
elements are not uniform. Thanks.

elecount:4
typesym:{Array Of Const/Constant Open} Array of ShortInt
ado_IsConvertedPointer: FALSE
ado_IsDynamicArray: FALSE
ado_IsVariant: FALSE
ado_IsConstructor: TRUE
ado_IsArrayOfConst: FALSE
ado_IsConstString: FALSE
ado_IsBitPacked: FALSE
ado_IsVector: FALSE
ado_IsGeneric: FALSE

                  writeln('elecount:',tarraydef(caller_def).elecount);
                  writeln('typesym:',tarraydef(caller_def).typesym.realname);
                  writeln('ado_IsConvertedPointer: ',ado_IsConvertedPointer in 
tarraydef(caller_def).arrayoptions);
                  writeln('ado_IsDynamicArray: ',ado_IsDynamicArray in 
tarraydef(caller_def).arrayoptions);
                  writeln('ado_IsVariant: ',ado_IsVariant in 
tarraydef(caller_def).arrayoptions);
                  writeln('ado_IsConstructor: ',ado_IsConstructor in 
tarraydef(caller_def).arrayoptions);
                  writeln('ado_IsArrayOfConst: ',ado_IsArrayOfConst in 
tarraydef(caller_def).arrayoptions);
                  writeln('ado_IsConstString: ',ado_IsConstString in 
tarraydef(caller_def).arrayoptions);
                  writeln('ado_IsBitPacked: ',ado_IsBitPacked in 
tarraydef(caller_def).arrayoptions);
                  writeln('ado_IsVector: ',ado_IsVector in 
tarraydef(caller_def).arrayoptions);
                  writeln('ado_IsGeneric: ',ado_IsGeneric in 
tarraydef(caller_def).arrayoptions);

Regards,
        Ryan Joseph

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to