summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbs/tw2425.pp
blob: 19c721961d2807cce9fe9723cc6cbe7ee4f0bc13 (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
{ %OPT=-Sen -vn }

{ Source provided for Free Pascal Bug Report 2425 }
{ Submitted by "Marco van de Voort" on  2003-03-18 }
{ e-mail: marco@freepascal.org }
{$mode Delphi}

type xx = class
            private
            function getx(i:integer):integer;
            Property blaat[i:integer]:integer read getx; default;
            End;


function xx.getx(i:integer):integer;

begin
 result:=i;
end;

var y : xx;

begin
 y:=xx.create;
 writeln(y[3]);
 if y[3]<>3 then
  halt(1);
 y.free;
end.