[fpc-pascal] $modeswitch declared before $mode fails without warning
    Hairy Pixels 
    genericptr at gmail.com
       
    Sun Sep 18 14:22:35 CEST 2022
    
    
  
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
    
    
More information about the fpc-pascal
mailing list