Selaa lähdekoodia

pastojs: filer: check GenericTemplateTypes

git-svn-id: trunk@42503 -
Mattias Gaertner 6 vuotta sitten
vanhempi
commit
8c38cea0a8
2 muutettua tiedostoa jossa 3 lisäystä ja 0 poistoa
  1. 2 0
      packages/pastojs/src/pas2jsfiler.pp
  2. 1 0
      packages/pastojs/tests/tcfiler.pas

+ 2 - 0
packages/pastojs/src/pas2jsfiler.pp

@@ -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);

+ 1 - 0
packages/pastojs/tests/tcfiler.pas

@@ -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]);