blob: 25c7f024e796456e7618f6237910236b6b26dbed (
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
40
41
42
43
44
45
|
{ %version=1.1 }
{$ifdef fpc}{$mode delphi}{$endif}
var
err : boolean;
type
tc1=class(tinterfacedobject)
constructor Create;overload;
constructor Create(s:string);overload;
end;
tc2=class(tc1)
constructor Create(l1,l2:longint);overload;
end;
constructor tc1.create;
begin
err:=true;
end;
constructor tc1.create(s:string);
begin
err:=true;
end;
constructor tc2.create(l1,l2:longint);
begin
{ The next line should do nothing }
inherited;
end;
var
c : tc2;
begin
err:=false;
c:=tc2.create(1,1);
c.free;
if err then
begin
writeln('Error!');
halt(1);
end;
end.
|