mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 09:28:48 +02:00
16 lines
283 B
ObjectPascal
16 lines
283 B
ObjectPascal
{ %NORUN }
|
|
{$mode objfpc}
|
|
{
|
|
test constants in generic procedures
|
|
}
|
|
program tgenconst4;
|
|
|
|
generic procedure DoThis<T;const U:string>(msg: string = U);
|
|
begin
|
|
writeln(msg, ' sizeof:',sizeof(t), ' default: ', U);
|
|
end;
|
|
|
|
begin
|
|
specialize DoThis<integer,'genparam'>('hello world');
|
|
end.
|