I finally built the trunk today (version 3.3.1) to try new dynamic array 
features and a bug fix Sven did a while ago but I’m still getting errors.

Did I get the wrong version or something? I thought these things were working 
now.

{$mode objfpc}
{$modeswitch advancedrecords}

program general;

type
        TIntArray = array of integer;
        TMyRec = record
                a: TIntArray;
                class operator := (right:TIntArray):TMyRec;
        end;

class operator TMyRec.:= (right:TIntArray):TMyRec;
begin
        result.a := right;
end;

var
        r: TMyRec;
        a: TIntArray;
begin
        r := [1, 2, 3]; // Incompatible types: got "Set Of Byte" expected 
"TMyRec"
        a := [1, 2, 3];
        a := a + [4];   // Operator is not overloaded: "{Dynamic} Array Of 
LongInt" + "Set Of Byte"
end.

Regards,
        Ryan Joseph

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to