One more thing today working with closures. Declaring the modeswitch before the 
mode does not actually enable the feature and gives no warning. What happens 
then is basic syntax fails and you’re totally confused as to why.

Shouldn’t this be illegal or give a warning at least?

{$modeswitch functionreferences}
{$modeswitch anonymousfunctions}
{$mode objfpc}

program test;
var
  p: reference to procedure;
begin
end.

Regards,
        Ryan Joseph

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to