mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 08:18:12 +02:00

pdecobj.pas, object_dec: * Always check for genericdef and genericlist and not genericdef and ifnot then genericlist. + added test git-svn-id: trunk@27877 -
26 lines
462 B
ObjectPascal
26 lines
462 B
ObjectPascal
{ %NORUN }
|
|
|
|
program tw26123;
|
|
|
|
{$mode objfpc}
|
|
|
|
type
|
|
generic TNode<data_type> = class // anything can go in this class
|
|
end;
|
|
|
|
generic TLinkedList<data_type> = class
|
|
type
|
|
specialized_TNode = specialize TNode<data_type>;
|
|
public
|
|
node : specialized_TNode;
|
|
end;
|
|
|
|
|
|
generic TExtendedLinkedList<data_type> = class (specialize TLinkedList<data_type>)
|
|
public
|
|
last_node : specialized_TNode;
|
|
end;
|
|
|
|
begin
|
|
end.
|