Default "constref" param is not accepted anymore
Original Reporter info from Mantis: Dibo
-
Reporter name: Krzysztof Dibowski
Original Reporter info from Mantis: Dibo
- Reporter name: Krzysztof Dibowski
Description:
Hi,
This code work with FPC 2.6.4 but in 3.0.0 (official deb package for Lazarus 1.6) I get:
"unit1.pas(30,42) Error: Default values can only be specified for
value, const and constref parameters"
... but why it is wrong? Even error message is saying that constref is ok
Steps to reproduce:
procedure Test(constref AParam: String = 'def_param');
begin
writeln(AParam);
end;
Additional information:
Lazarus 1.6 64bit
FPC 3.0.0 64 bit
Linux Kubuntu 14.04 64bit
Confirmed also by someone else from mailing list:
http://lists.freepascal.org/pipermail/fpc-pascal/2016-April/047514.html
Mantis conversion info:
- Mantis ID: 29992
- OS: Kubuntu
- OS Build: 14.04 64bit
- Build: 151205
- Platform: Linux
- Version: 3.0.0
- Fixed in version: 3.1.1
- Fixed in revision: 33480 (#08d63e34)