fpc/tests/test/timpfuncspez5.pp
Sven/Sarah Barth 90844c2027 * fix #35261: apply slightly adjusted changes by Ryan Joseph to implement support for implicit generic function specializations
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
2022-04-20 18:59:31 +02:00

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.