Browse Source

Checking the compatibility of the procedure with the await function.

Henrique Gottardi Werlang 1 year ago
parent
commit
e0da2d0e46
1 changed files with 6 additions and 0 deletions
  1. 6 0
      packages/pastojs/src/fppas2js.pp

+ 6 - 0
packages/pastojs/src/fppas2js.pp

@@ -6199,6 +6199,12 @@ begin
       if not CheckProcedureAsync(TPasProcedureType(TypeEl)) then
       if not CheckProcedureAsync(TPasProcedureType(TypeEl)) then
         Exit(cIncompatible);
         Exit(cIncompatible);
       end
       end
+    else if (ParamResolved.BaseType=btContext)
+        and (ParamResolved.IdentEl is TPasProcedure) then
+      begin
+      if not CheckProcedureAsync(TPasProcedure(ParamResolved.IdentEl).ProcType) then
+        Exit(cIncompatible)
+      end
     else
     else
       begin
       begin
       {$IFDEF VerbosePas2JS}
       {$IFDEF VerbosePas2JS}