mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 13:28:05 +02:00

The main adjustments were as follows: - fixing coding style and identation - fixing some typos - using a better name for the property in tcallcandidates which holds the symbols created for anonymous parameter values
22 lines
304 B
ObjectPascal
22 lines
304 B
ObjectPascal
{$mode objfpc}
|
|
{$modeswitch implicitfunctionspecialization}
|
|
{
|
|
Test "array of enum"
|
|
}
|
|
|
|
program timpfuncspez5;
|
|
uses
|
|
typinfo;
|
|
|
|
type
|
|
TMyEnum = (_A, _B, _C);
|
|
|
|
generic procedure DoThis<T>(value: T);
|
|
begin
|
|
if GetTypeKind(value[0]) <> tkEnumeration then
|
|
Halt(-1);
|
|
end;
|
|
|
|
begin
|
|
DoThis([_A, _B]);
|
|
end. |