peter 20 years ago
parent
commit
2326c2b62f
4 changed files with 87 additions and 0 deletions
  1. 26 0
      tests/tbs/tb0489.pp
  2. 19 0
      tests/tbs/ub0489.pp
  3. 16 0
      tests/tbs/ub0489b.pp
  4. 26 0
      tests/webtbf/tw3841.pp

+ 26 - 0
tests/tbs/tb0489.pp

@@ -0,0 +1,26 @@
+{$mode delphi}
+uses ub0489;
+type oo = class
+            function getmyint:integer;
+            property someprop:integer read getmyint;
+            end;
+
+function oo.getmyint:integer;
+
+begin
+  result:=1;
+end;
+
+
+
+procedure test2;
+
+var ch:char;
+    x : oo;
+
+begin
+  test(x.someprop,ch,1);
+end;
+
+begin
+end.

+ 19 - 0
tests/tbs/ub0489.pp

@@ -0,0 +1,19 @@
+{$mode delphi}
+
+unit ub0489;
+
+interface
+
+function test(b:integer;const x;c:integer):integer inline;
+
+implementation
+
+uses
+  ub0489b;
+
+function test(b:integer;const x;c:integer):integer inline;
+begin
+  result:=fpwrite(b,x,c);
+end;
+
+end.

+ 16 - 0
tests/tbs/ub0489b.pp

@@ -0,0 +1,16 @@
+{$mode delphi}
+
+unit ub0489b;
+
+interface
+
+function fpwrite(b:integer;const x;c:integer):integer;
+
+implementation
+
+function fpwrite(b:integer;const x;c:integer):integer;
+begin
+  writeln('fpwrite');
+end;
+
+end.

+ 26 - 0
tests/webtbf/tw3841.pp

@@ -0,0 +1,26 @@
+{ %fail }
+
+{ Source provided for Free Pascal Bug Report 3841 }
+{ Submitted by "Joost v.d. Sluis" on  2005-03-28 }
+{ e-mail:  }
+{$mode objfpc}
+
+type TMyClass = Class(TObject)
+     private
+       Function GetInte : Integer;
+     public
+       property Inte : Integer read GetInte;
+     end;
+
+var buf     : longint;
+    MyClass : TMyClass;
+
+function TMyClass.GetInte : integer;
+begin
+  Result := 1010;
+end;
+
+begin
+  MyClass.Create;
+  move(MyClass.inte,buf,sizeof(longint));
+end.