QuickLogger icon indicating copy to clipboard operation
QuickLogger copied to clipboard

Incompatible types: 'array of TVarRec' and 'Procedure'

Open FIFernandes opened this issue 3 years ago • 1 comments

If I have Quick.Threads in the interface/uses I get an compile error:

aTask := TTask.Create( procedure( ) begin end ); <<<Incompatible types: 'array of TVarRec' and 'Procedure' aTask.Start;

Delphi 10.3.3

FIFernandes avatar Jun 06 '22 17:06 FIFernandes

TTask constructor needs 3 params:

constructor TTask.Create(aParamArray : array of const; aOwnedParams : Boolean; aTaskProc : TTaskProc);

You have missed two previous params.

aTask := TTask.Create([],False,
procedure( )
begin
end ); <<<Incompatible types: 'array of TVarRec' and 'Procedure'
aTask.Start;

exilon avatar Jun 08 '22 20:06 exilon