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
packages/pastojs

View File

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

View File

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