mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 07:08:29 +02:00

symdef.pas, tstoreddef: * is_specialization: fix exit condition to correctly recognize specializations + added test git-svn-id: trunk@29328 -
19 lines
350 B
ObjectPascal
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.
|