mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 07:59:09 +02:00
* external handling test
This commit is contained in:
parent
5e0bc4b8ad
commit
87d02dfb7e
9
tests/test/tprocext.pp
Normal file
9
tests/test/tprocext.pp
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
uses uprocext1;
|
||||||
|
|
||||||
|
begin
|
||||||
|
err:=true;
|
||||||
|
proc1;
|
||||||
|
if err then
|
||||||
|
halt(1);
|
||||||
|
end.
|
||||||
|
|
9
tests/test/uprocext1.pp
Normal file
9
tests/test/uprocext1.pp
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
unit uprocext1;
|
||||||
|
interface
|
||||||
|
var
|
||||||
|
err : boolean;
|
||||||
|
procedure proc1;
|
||||||
|
implementation
|
||||||
|
uses uprocext2;
|
||||||
|
procedure proc1;external name 'ExternalProc3';
|
||||||
|
end.
|
22
tests/test/uprocext2.pp
Normal file
22
tests/test/uprocext2.pp
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
unit uprocext2;
|
||||||
|
interface
|
||||||
|
uses uprocext1;
|
||||||
|
|
||||||
|
procedure proc2;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
procedure proc3;[public,alias:'ExternalProc3'];
|
||||||
|
begin
|
||||||
|
writeln('proc3');
|
||||||
|
err:=false;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure proc2;
|
||||||
|
begin
|
||||||
|
{ call proc1 so it already needs the mangledname }
|
||||||
|
proc1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user