Browse Source

* new bug

peter 20 years ago
parent
commit
eeb657e5b2
2 changed files with 46 additions and 0 deletions
  1. 36 0
      tests/webtbf/tw3662.pp
  2. 10 0
      tests/webtbs/tw3667.pp

+ 36 - 0
tests/webtbf/tw3662.pp

@@ -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 - 0
tests/webtbs/tw3667.pp

@@ -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.
+