Skip to content

Anonymous function without captured variables used as a plain function is hinted as unused.

Code below produces a hint (ID=5028):

Hint: Local proc "__FPCINTERNAL__Anonymous_7" is not used.

{$modeswitch anonymousfunctions}
var
	p: procedure(const s: string);
begin
	p := procedure(const s: string) begin writeln(s); end;
	p('test');
end.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information