Browse Source

* new bugs

peter 22 years ago
parent
commit
fddfe234eb
5 changed files with 111 additions and 0 deletions
  1. 20 0
      tests/webtbs/tw2724.pp
  2. 23 0
      tests/webtbs/tw2725.pp
  3. 34 0
      tests/webtbs/tw2727.pp
  4. 17 0
      tests/webtbs/tw2728.pp
  5. 17 0
      tests/webtbs/tw2729.pp

+ 20 - 0
tests/webtbs/tw2724.pp

@@ -0,0 +1,20 @@
+{ Source provided for Free Pascal Bug Report 2724 }
+{ Submitted by "marco" on  2003-10-08 }
+{ e-mail:  }
+
+{$Mode delphi}
+type
+  TBitSet = class(TBits)
+    constructor Create(aSize: integer);
+  end;
+
+{ TBitSet }
+
+constructor TBitSet.Create(aSize: integer);
+begin
+  inherited Create;
+  Size := aSize;
+end;
+
+begin
+end.

+ 23 - 0
tests/webtbs/tw2725.pp

@@ -0,0 +1,23 @@
+{ Source provided for Free Pascal Bug Report 2725 }
+{ Submitted by "marco" on  2003-10-08 }
+{ e-mail:  }
+
+{$Mode delphi}
+
+Uses Classes;
+
+type
+  TBitSet = class(TBits)
+    constructor Create(aSize: integer);
+  end;
+
+{ TBitSet }
+
+constructor TBitSet.Create(aSize: integer);
+begin
+  inherited Create;
+  Size := aSize;
+end;
+
+begin
+end.

+ 34 - 0
tests/webtbs/tw2727.pp

@@ -0,0 +1,34 @@
+{ Source provided for Free Pascal Bug Report 2727 }
+{ Submitted by "marco (the gory bugs department)" on  2003-10-08 }
+{ e-mail:  }
+
+{$mode delphi}
+
+
+type
+  IPersistenceCapable = interface;
+
+  TPersistenceCapable = class(TInterfacedObject, IPersistenceCapable)
+   function nonsense:boolean;
+  end;
+
+    IPersistenceCapable = interface
+    ['{A7F3DA50-93BF-4EAF-B40C-8F5020E5D890}']
+    function GetSelf: TObject;
+    property Self: TObject read GetSelf;
+  end;
+
+
+function TPersistenceCapable.nonsense:boolean;
+{this works fine if it isn't a method....}
+
+var
+  lSource: IPersistenceCapable;
+
+begin
+     result:=(lSource.Self is TPersistenceCapable)
+end;
+
+
+begin
+end.

+ 17 - 0
tests/webtbs/tw2728.pp

@@ -0,0 +1,17 @@
+{ Source provided for Free Pascal Bug Report 2728 }
+{ Submitted by "marco (the gory bugs department)" on  2003-10-09 }
+{ e-mail:  }
+{$mode delphi}
+type baseclass = class end;
+     tbaseclass= class of baseclass;
+
+function test (c : tbaseclass):longint;
+
+var o :tobject;
+
+begin
+  o:=tobject(c);   // illegal type conversion here
+end;
+
+begin
+end.

+ 17 - 0
tests/webtbs/tw2729.pp

@@ -0,0 +1,17 @@
+{ Source provided for Free Pascal Bug Report 2729 }
+{ Submitted by "marco (the gory bugs department)" on  2003-10-09 }
+{ e-mail:  }
+{$mode delphi}
+
+type  tbla= class(tobject)
+              class function bla:tbla;
+              end;
+
+class function tbla.bla:tbla;
+
+begin
+ result:=Create;
+end;
+
+begin
+end.