mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 16:09:25 +02:00
* new bug
This commit is contained in:
parent
0ae80eea41
commit
eeb657e5b2
36
tests/webtbf/tw3662.pp
Normal file
36
tests/webtbf/tw3662.pp
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
{ %fail }
|
||||||
|
|
||||||
|
{$ifdef fpc}{$MODE delphi}{$endif}
|
||||||
|
|
||||||
|
type
|
||||||
|
TA = class(TInterfacedObject)
|
||||||
|
public
|
||||||
|
constructor Create;
|
||||||
|
end;
|
||||||
|
|
||||||
|
TB = class(TA)
|
||||||
|
function Clone: TB;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
constructor TA.Create;
|
||||||
|
begin
|
||||||
|
inherited Create;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TB.Clone: TB;
|
||||||
|
var
|
||||||
|
b: TB;
|
||||||
|
begin
|
||||||
|
b := Create;
|
||||||
|
writeln(integer(b));
|
||||||
|
writeln(integer(self));
|
||||||
|
Result := b;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
aa,aa2: TB;
|
||||||
|
begin
|
||||||
|
aa := TB.Create;
|
||||||
|
aa2 := aa.Clone;
|
||||||
|
end.
|
10
tests/webtbs/tw3667.pp
Normal file
10
tests/webtbs/tw3667.pp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{ Source provided for Free Pascal Bug Report 3666 }
|
||||||
|
{ Submitted by "marco" on 2005-02-17 }
|
||||||
|
{ e-mail: }
|
||||||
|
|
||||||
|
Type
|
||||||
|
otherset = ( bla =5, bla2=9,bla3=bla+bla2);
|
||||||
|
|
||||||
|
begin
|
||||||
|
end.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user