fpc/tests/test/texrtti17.pp
2024-07-27 08:21:44 +02:00

37 lines
639 B
ObjectPascal

program texrtti17;
{$mode objfpc}
{ Test that class properties are not returned in RTTI }
uses typinfo, uexrttiutil;
{$RTTI INHERIT
METHODS(DefaultMethodRttiVisibility)
FIELDS(DefaultFieldRttiVisibility)
PROPERTIES(DefaultPropertyRttiVisibility)
}
Type
T1 = Class(TObject)
class function getsomething : integer; static;
class property Something : Integer Read GetSomething;
end;
class function T1.getsomething : integer;
begin
Result:=0;
end;
var
aCount : Integer;
P: PPropListEx;
begin
aCount:=GetPropListEx(T1,P);
AssertEquals('class property not in RTTI properties',0,aCount);
end.