diff --git a/compiler/packages/fcl-passrc/src/pasresolver.pp b/compiler/packages/fcl-passrc/src/pasresolver.pp index b789d62..b79528c 100644 --- a/compiler/packages/fcl-passrc/src/pasresolver.pp +++ b/compiler/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; diff --git a/compiler/packages/pastojs/tests/tcmodules.pas b/compiler/packages/pastojs/tests/tcmodules.pas index 3d1402b..0e796d1 100644 --- a/compiler/packages/pastojs/tests/tcmodules.pas +++ b/compiler/packages/pastojs/tests/tcmodules.pas @@ -32694,7 +32694,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;',