mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 22:08:11 +02:00

default value (mantis #22343) * give an error when specifying an invalid default value (e.g. a floating point number for a longint parameter) git-svn-id: trunk@22021 -
17 lines
233 B
ObjectPascal
17 lines
233 B
ObjectPascal
{ %fail }
|
||
|
||
{$IFDEF FPC}
|
||
{$MODE DELPHI}
|
||
{$ENDIF}
|
||
|
||
type
|
||
TWrapper = record end;
|
||
|
||
procedure TestProcedure(const wr: TWrapper = 0);
|
||
{ This shouldn’t be allowed; try also 0.0, '0', nil, False, reNone, etc. }
|
||
begin
|
||
end;
|
||
|
||
begin
|
||
end.
|