> On Oct 15, 2022, at 3:58 PM, Michael Van Canneyt
> wrote:
>
> One reason we do not allow descendents is that if you have a var array, the
> returned value may contain classes of a type that the caller does not expect.
> (This is the same reason why (var value: TObject) requires an exact matc
On Sat, 15 Oct 2022, Hairy Pixels via fpc-pascal wrote:
Another question I just ran in to. Why isn’t "array of TMyClass” compatible
with “array of TObject” open array? TMyClass is a descendant of TObject and dynamic
arrays are compatible with open arrays right?
==
type
Another question I just ran in to. Why isn’t "array of TMyClass” compatible
with “array of TObject” open array? TMyClass is a descendant of TObject and
dynamic arrays are compatible with open arrays right?
==
type
TMyClass = class
end;
procedure MyProcedure(values: arra