blob: fc0e99528d10f8d4441b8fbc1fa6163c7a6c0e6e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
{ %version=1.1 }
{$ifdef fpc}{$mode objfpc}{$endif}
var
err : boolean;
type
tc1=class
constructor Create;overload;
end;
tc2=class(tc1)
constructor Create(l:longint=0);overload;
end;
constructor tc1.create;
begin
writeln('tc1.create()');
end;
constructor tc2.create(l:longint);
begin
writeln('tc2.create()');
err:=false;
end;
var
c : tc2;
begin
err:=true;
c:=tc2.create();
c.free;
if err then
begin
writeln('Error!');
halt(1);
end;
end.
|