mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-31 03:30:39 +02:00
* check dup id for tp/delphi
This commit is contained in:
parent
9b8162972f
commit
97d5c0b6ac
27
tests/tbf/tbf0320.pp
Normal file
27
tests/tbf/tbf0320.pp
Normal 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
30
tests/tbs/tbs0319.pp
Normal 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.
|
Loading…
Reference in New Issue
Block a user