summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbs/tw3564.pp
blob: 98af50a8c63eda831432a79e42989ad6928ac4f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{ Source provided for Free Pascal Bug Report 3564 }
{ Submitted by "Patrick Dietrich" on  2005-01-17 }
{ e-mail: patrick.dietrich@SPAM.informatik.ME.uni-ulm.NOT.de }

{$mode delphi}

type
   StringArray = array of string;

   TestClass = class(TObject)
   public
      FArr : StringArray;
      function getArr: StringArray;
      function getCopy: StringArray;
      constructor create;
      property arr : StringArray read getArr;
   end;

function TestClass.getArr: StringArray;
begin
   result := self.FArr;
end;

function TestClass.getCopy: StringArray;
begin
   Result := Copy(arr, 0, Length(arr)-1);
end; { getCopy }

constructor TestClass.create;
begin
   setLength( Farr, 3);

   Farr[0] := 'one';
   Farr[1] := 'two';
   Farr[2] := 'three';
end;

begin
end.