mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-10 19:26:09 +02:00
* allow default parameters for constref (mantis #29992)
git-svn-id: trunk@33480 -
This commit is contained in:
parent
953c47dd97
commit
08d63e3408
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -15004,6 +15004,7 @@ tests/webtbs/tw29930.pp svneol=native#text/plain
|
||||
tests/webtbs/tw29958.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw2998.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2999.pp svneol=native#text/plain
|
||||
tests/webtbs/tw29992.pp svneol=native#text/plain
|
||||
tests/webtbs/tw3004.pp svneol=native#text/plain
|
||||
tests/webtbs/tw3005.pp svneol=native#text/plain
|
||||
tests/webtbs/tw3010.pp svneol=native#text/plain
|
||||
|
@ -261,7 +261,7 @@ implementation
|
||||
vs:=tparavarsym(sc[0]);
|
||||
if sc.count>1 then
|
||||
Message(parser_e_default_value_only_one_para);
|
||||
if not(vs.varspez in [vs_value,vs_const]) then
|
||||
if not(vs.varspez in [vs_value,vs_const,vs_constref]) then
|
||||
Message(parser_e_default_value_val_const);
|
||||
bt:=block_type;
|
||||
block_type:=bt_const;
|
||||
|
11
tests/webtbs/tw29992.pp
Normal file
11
tests/webtbs/tw29992.pp
Normal file
@ -0,0 +1,11 @@
|
||||
{ %norun }
|
||||
|
||||
{$mode objfpc}
|
||||
|
||||
procedure Test(constref AParam: String = 'def_param');
|
||||
begin
|
||||
writeln(AParam);
|
||||
end;
|
||||
|
||||
begin
|
||||
end.
|
Loading…
Reference in New Issue
Block a user