rtl: reuse existing rtticontext, still not Delphi compatible, issue 38812, from Henrique Gottardi Werlang

This commit is contained in:
mattias 2021-04-30 09:17:33 +00:00
parent e36441b661
commit 0dd3a997c1

View File

@ -1187,13 +1187,13 @@ begin
Name:=t.Name;
if isModule(t.Module) then
Name:=t.Module.Name+'.'+Name;
if FPool.hasOwnProperty(Name) then
Result:=TRttiType(FPool[Name])
if GRttiContext.FPool.hasOwnProperty(Name) then
Result:=TRttiType(GRttiContext.FPool[Name])
else
begin
Result := RttiTypeClass[T.Kind].Create(aTypeInfo);
FPool[Name]:=Result;
GRttiContext.FPool[Name]:=Result;
end;
end;