Fixed incompatibilities with Delphi Sydney and previous (thanks Mark Lobanov)

This commit is contained in:
Daniele Teti 2024-04-10 14:19:21 +02:00
parent 7332259f25
commit 6d1ea32678

View File

@ -191,7 +191,11 @@ begin
lConstructors := RttiType.GetMethods('Create'); lConstructors := RttiType.GetMethods('Create');
for lConstructor in lConstructors do for lConstructor in lConstructors do
begin begin
{$IF Defined(ALEXANDRIAORBETTER)}
if lConstructor.HasAttribute<T> then if lConstructor.HasAttribute<T> then
{$ELSE}
if TRttiUtils.HasAttribute<T>(lConstructor) then
{$ENDIF}
begin begin
Result := lConstructor; Result := lConstructor;
break; { the first wins } break; { the first wins }