pastojs: filer: check GenericTemplateTypes

git-svn-id: trunk@42503 -
This commit is contained in:
Mattias Gaertner 2019-07-27 06:58:32 +00:00
parent 52ef731f42
commit 8c38cea0a8
2 changed files with 3 additions and 0 deletions

View File

@ -3633,6 +3633,7 @@ procedure TPCUWriter.WriteProcedureType(Obj: TJSONObject;
El: TPasProcedureType; aContext: TPCUWriterContext); El: TPasProcedureType; aContext: TPCUWriterContext);
begin begin
WritePasElement(Obj,El,aContext); WritePasElement(Obj,El,aContext);
WriteGenericTemplateTypes(Obj,El,El.GenericTemplateTypes,aContext);
WriteElementList(Obj,El,'Args',El.Args,aContext); WriteElementList(Obj,El,'Args',El.Args,aContext);
if El.CallingConvention<>ccDefault then if El.CallingConvention<>ccDefault then
Obj.Add('Call',PCUCallingConventionNames[El.CallingConvention]); Obj.Add('Call',PCUCallingConventionNames[El.CallingConvention]);
@ -7280,6 +7281,7 @@ var
c: TCallingConvention; c: TCallingConvention;
begin begin
ReadPasElement(Obj,El,aContext); ReadPasElement(Obj,El,aContext);
ReadGenericTemplateTypes(Obj,El,El.GenericTemplateTypes,aContext);
ReadElementList(Obj,El,'Args',El.Args, ReadElementList(Obj,El,'Args',El.Args,
{$IFDEF CheckPasTreeRefCount}'TPasProcedureType.Args'{$ELSE}true{$ENDIF}, {$IFDEF CheckPasTreeRefCount}'TPasProcedureType.Args'{$ELSE}true{$ENDIF},
aContext); aContext);

View File

@ -1460,6 +1460,7 @@ end;
procedure TCustomTestPrecompile.CheckRestoredProcedureType(const Path: string; procedure TCustomTestPrecompile.CheckRestoredProcedureType(const Path: string;
Orig, Rest: TPasProcedureType); Orig, Rest: TPasProcedureType);
begin begin
CheckRestoredElementList(Path+'.GenericTemplateTypes',Orig.GenericTemplateTypes,Rest.GenericTemplateTypes);
CheckRestoredElementList(Path+'.Args',Orig.Args,Rest.Args); CheckRestoredElementList(Path+'.Args',Orig.Args,Rest.Args);
if Orig.CallingConvention<>Rest.CallingConvention then if Orig.CallingConvention<>Rest.CallingConvention then
Fail(Path+'.CallingConvention Orig='+PCUCallingConventionNames[Orig.CallingConvention]+' Rest='+PCUCallingConventionNames[Rest.CallingConvention]); Fail(Path+'.CallingConvention Orig='+PCUCallingConventionNames[Orig.CallingConvention]+' Rest='+PCUCallingConventionNames[Rest.CallingConvention]);