* check dup id for tp/delphi

This commit is contained in:
peter 2000-06-01 19:05:52 +00:00
parent 9b8162972f
commit 97d5c0b6ac
2 changed files with 57 additions and 0 deletions

27
tests/tbf/tbf0320.pp Normal file
View File

@ -0,0 +1,27 @@
{$ifdef fpc}{$mode delphi}{$endif}
{ These should give an error, as also done in tp,delphi.
See tbs0319.pp for a test with class which should compile in
delphi mode }
type
cl=object
k : longint;
procedure p1;
procedure p2;
end;
procedure cl.p1;
var
k : longint;
begin
end;
procedure cl.p2;
var
p1 : longint;
begin
end;
begin
end.

30
tests/tbs/tbs0319.pp Normal file
View File

@ -0,0 +1,30 @@
{$ifdef fpc}{$mode delphi}{$endif}
function a:longint;
var
a : longint;
begin
a:=1;
end;
type
cl=class
k : longint;
procedure p1;
procedure p2;
end;
procedure cl.p1;
var
k : longint;
begin
end;
procedure cl.p2;
var
p1 : longint;
begin
end;
begin
end.