> On Apr 10, 2021, at 9:47 AM, Ryan Joseph <[email protected]> wrote:
>
> Just checked and pass_typecheck is called before overloading but
> ado_IsVariant is simply never set for that array. In tarraydef.GetTypeName
> you can see that "array of const" is associated with many flags so maybe we
> need to make a new flag which means "non-uniform elements"? I could probably
> easily build that into pass_typecheck for array constructors.
>
> ...
> if (ado_isarrayofconst in arrayoptions) or
> (ado_isConstructor in arrayoptions) then
> begin
> if (ado_isvariant in arrayoptions) or ((highrange=-1) and
> (lowrange=0)) then
> GetTypeName:='Array Of Const'
> else
> GetTypeName:='{Array Of Const/Constant Open} Array of
> '+elementdef.typename;
> end
>
Any word on what I should do about this? If those flags present are not
sufficient I'll add another flag but if that's not acceptable I'll simply have
to allow the user to specialize with these array types, even though they will
fail later one when the function is selected during overloading. Once I know
that I'll submit another patch including the other changes that were requested.
Regards,
Ryan Joseph
_______________________________________________
fpc-devel maillist - [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel