*** empty log message ***

This commit is contained in:
carl 2002-10-05 15:21:36 +00:00
parent 302c977a8b
commit e792ab5ab1
3 changed files with 72 additions and 0 deletions

25
tests/tbf/tb0125.pp Normal file
View File

@ -0,0 +1,25 @@
{ %fail }
{ Returns this error under Delphi :
{ Error: Types of actual and formal var parameters must be identical }
{$ifdef fpc}
{$mode objfpc}
{$endif}
type
tsymbol = class
end;
tderivedsymbol = class(tsymbol)
end;
procedure testclass(var t: tsymbol);
begin
end;
var
myclass : tderivedsymbol;
begin
myclass := tderivedsymbol.create;
testclass(myclass);
end.

25
tests/tbf/tb0126.pp Normal file
View File

@ -0,0 +1,25 @@
{ %fail }
{ This program should fail compilation, since
the declaration is not the same as the actual
implementation, checked against Delphi 3 -
the class keyword is missing in front
of procedure tmyclass.myproc
}
{$ifdef fpc}
{$mode objfpc}
{$endif}
type
tmyclass = class
class procedure myproc;virtual;
end;
{ missing class keyword in front of procedure }
procedure tmyclass.myproc;
begin
end;
Begin
end.

22
tests/tbs/tb0408.pp Normal file
View File

@ -0,0 +1,22 @@
{ This passes under Delphi and Borland pascal }
{ for objects, classes don't pass, cf. /tbf/tb0125 }
type
tobjsymbol = object
end;
tobjderivedsymbol = object(tobjsymbol)
end;
procedure testobject(var t: tobjsymbol);
begin
end;
var
myobject : tobjderivedsymbol;
begin
testobject(myobject);
end.