Browse Source

pastojs: async modifier not needed in impl proc

git-svn-id: trunk@47470 -
Mattias Gaertner 4 years ago
parent
commit
3ef12409c9
2 changed files with 2 additions and 2 deletions
  1. 1 1
      packages/fcl-passrc/src/pasresolver.pp
  2. 1 1
      packages/pastojs/tests/tcmodules.pas

+ 1 - 1
packages/fcl-passrc/src/pasresolver.pp

@@ -9467,7 +9467,7 @@ begin
       RaiseIncompatibleType(20170216151734,nResultTypeMismatchExpectedButFound,
         [],DeclResult,ImplResult,ImplProc);
 
-    if ImplProc.IsAsync<>DeclProc.IsAsync then
+    if ImplProc.IsAsync and not DeclProc.IsAsync then
       RaiseMsg(20200524111856,nXModifierMismatchY,sXModifierMismatchY,['procedure type','async'],ImplProc);
     end;
 

+ 1 - 1
packages/pastojs/tests/tcmodules.pas

@@ -32700,7 +32700,7 @@ begin
   'function TObject.Run(w: word = 3): word; async;',
   'begin',
   'end;',
-  'function TBird.Run(w: word = 3): word; async;',
+  'function TBird.Run(w: word = 3): word;', // async modifier not needed in impl
   'var p: TJSPromise;',
   'begin',
   '  p:=inherited;',