mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 01:08:07 +02:00

a non-refcounted type to a procedure, as this is incompatible with the inlining process git-svn-id: trunk@8391 -
28 lines
362 B
ObjectPascal
28 lines
362 B
ObjectPascal
{$ifdef fpc}
|
|
{$mode objfpc}
|
|
{$inline on}
|
|
{$endif}
|
|
|
|
function fa: ansistring;
|
|
begin
|
|
fa:='b';
|
|
fa:=result+'a';
|
|
end;
|
|
|
|
function fb: ansistring;
|
|
begin
|
|
fb:='c';
|
|
fb:=result+'d';
|
|
end;
|
|
|
|
procedure test(const a,b: pointer); inline;
|
|
begin
|
|
if (ansistring(a)<>'ba') or
|
|
(ansistring(b)<>'cd') then
|
|
halt(1);
|
|
end;
|
|
|
|
begin
|
|
test(pointer(fa()),pointer(fb()));
|
|
end.
|