mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-12 20:33:13 +02:00
22 lines
221 B
ObjectPascal
22 lines
221 B
ObjectPascal
{ %fail }
|
|
{$mode objfpc}
|
|
|
|
type
|
|
ta = class
|
|
end;
|
|
|
|
tb = class(ta)
|
|
end;
|
|
|
|
procedure test(var a: ta);
|
|
begin
|
|
a.free;
|
|
a:=ta.create;
|
|
// now b contains an instance of type "ta"
|
|
end;
|
|
|
|
var
|
|
b: tb;
|
|
begin
|
|
test(b);
|
|
end. |