mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 07:58:04 +02:00
24 lines
252 B
ObjectPascal
24 lines
252 B
ObjectPascal
{$mode objfpc}
|
|
|
|
{ tests forward class types }
|
|
|
|
type
|
|
tclass1 = class;
|
|
|
|
tclass2 = class
|
|
class1 : tclass1;
|
|
end;
|
|
|
|
var
|
|
c : tclass1;
|
|
|
|
type
|
|
tclass1 = class(tclass2)
|
|
i : longint;
|
|
end;
|
|
|
|
begin
|
|
c:=tclass1.create;
|
|
c.i:=12;
|
|
end.
|