fpc/tests/test/tarray20.pp
svenbarth 18519c9559 * fix for Mantis #34526: rely on tc_arrayconstructor_2_set instead of manually converting an array constructor to a set, this way assignment operator overloads are taken into account as well
Note: there is still a conversion to a set if the types were determined to be incompatible, so that the error is still "set of X is incompatible to Y" instead of "array of Z is incompatible to Y"
+ added tests

git-svn-id: trunk@41844 -
2019-04-05 15:24:39 +00:00

22 lines
210 B
ObjectPascal

{ %FAIL }
program tarray20;
{$mode objfpc}
{$modeswitch advancedrecords}
type
TTest = record
end;
operator Explicit(a: array of LongInt): TTest;
begin
end;
var
t: TTest;
begin
t := [21, 42];
end.