fpc/tests/test/timpfuncspez4.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

19 lines
325 B
ObjectPascal

{$mode objfpc}
{$modeswitch implicitfunctionspecialization}
{
Test string literals (array of char) is compatible with open arrays
}
program timpfuncspez4;
uses
typinfo;
generic function DoThis<T>(a: array of T): TTypeKind;
begin
result := GetTypeKind(T);
end;
begin
if DoThis('string') <> tkChar then
Halt(-1);
end.