fpc/tests/test/tgeneric97.pp
svenbarth 5848637db3 Fix generation of class names for specializations.
symdef.pas, tstoreddef:
  * is_specialization: fix exit condition to correctly recognize specializations

+ added test

git-svn-id: trunk@29328 -
2014-12-26 18:14:52 +00:00

19 lines
350 B
ObjectPascal

program tgeneric97;
{$mode objfpc}
type
generic TTest<T> = class
end;
TTestLongInt = specialize TTest<LongInt>;
TTestString = specialize TTest<AnsiString>;
begin
if LowerCase(TTestLongInt.ClassName) <> 'ttest<system.longint>' then
halt(1);
if LowerCase(TTestString.ClassName) <> 'ttest<system.ansistring>' then
halt(2);
end.