mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 12:38:29 +02:00

nil, such as while parsing a property definition (mantis #14849) git-svn-id: trunk@13958 -
49 lines
716 B
ObjectPascal
49 lines
716 B
ObjectPascal
{ %norun }
|
|
{ %fail }
|
|
|
|
unit tw14849;
|
|
|
|
{$mode objfpc}
|
|
|
|
interface
|
|
uses
|
|
Classes, SysUtils;
|
|
|
|
type
|
|
TMarkerState=(leftActive,rightActive);
|
|
|
|
TWorldPoint=record
|
|
fX,fY:double;
|
|
end;
|
|
|
|
TCoolClass = class(TComponent)
|
|
private
|
|
fMarkerPos:array[TMarkerState] of TWorldPoint;
|
|
{ private declarations }
|
|
|
|
public
|
|
function LeftMarker :integer;
|
|
function RightMarker:integer;
|
|
{ public declarations }
|
|
{ error: using function to index property }
|
|
property xLPM:double read fMarkerPos[leftMarker].fX write fMarkerPos[leftmarker].fX;
|
|
end;
|
|
|
|
implementation
|
|
|
|
function TCoolClass.LeftMarker :integer;
|
|
begin
|
|
Result:=0;
|
|
end;
|
|
|
|
function TCoolClass.RightMarker:integer;
|
|
begin
|
|
Result:=1;
|
|
end;
|
|
|
|
|
|
|
|
|
|
end.
|
|
|