fpc/tests/webtbf/tw2751.pp
fpc 790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00

40 lines
488 B
ObjectPascal

{ %fail }
{ Source provided for Free Pascal Bug Report 2751 }
{ Submitted by "Micha" on 2003-10-26 }
{ e-mail: }
program Construct;
{$mode delphi}
type
ta = class
public
constructor Create(a: tclass);
end;
tb = class(ta)
public
constructor Create(a: tobject);
end;
constructor ta.create(a: tclass);
begin
end;
constructor tb.create(a: tobject);
begin
end;
var
b: tb;
c: tclass;
begin
c := tb;
// This should fail
b := tb.create(c);
b.free;
end.