[fpc-pascal] FPC 3.0.0 and constref default param

Maciej Izak hnb.code at gmail.com
Sun Apr 10 20:10:17 CEST 2016


2016-03-28 17:49 GMT+02:00 Krzysztof <dibo20 at wp.pl>:

> This code worked fine on FPC 2.6.4:
>
> procedure Test(constref AParam: String = 'def_param');
> begin
>   writeln(AParam);
> end;
>
> But on FPC 3.0.0 I get error:
>
> unit1.pas(30,42) Error: Default values can only be specified for
> value, const and constref parameters
>

I can confirm. Seems like is worth to put this on bugtracker :)
-- 
Best regards,
Maciej Izak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160410/7f71e425/attachment.html>


More information about the fpc-pascal mailing list