mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-21 23:21:39 +02:00
* niln has a compelxity of 0 (so the inlining code doesn't try to take
its address) (mantis 8028) git-svn-id: trunk@5735 -
This commit is contained in:
parent
e459f8a26f
commit
5988e6d117
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -7986,6 +7986,7 @@ tests/webtbs/tw7847.pp svneol=native#text/plain
|
||||
tests/webtbs/tw7963.pp svneol=native#text/plain
|
||||
tests/webtbs/tw7975.pp svneol=native#text/plain
|
||||
tests/webtbs/tw7975a.pp svneol=native#text/plain
|
||||
tests/webtbs/tw8028.pp svneol=native#text/plain
|
||||
tests/webtbs/ub1873.pp svneol=native#text/plain
|
||||
tests/webtbs/ub1883.pp svneol=native#text/plain
|
||||
tests/webtbs/uw0555.pp svneol=native#text/plain
|
||||
|
@ -628,7 +628,8 @@ implementation
|
||||
tempcreaten,
|
||||
tempdeleten,
|
||||
ordconstn,
|
||||
pointerconstn:
|
||||
pointerconstn,
|
||||
niln:
|
||||
exit;
|
||||
else
|
||||
begin
|
||||
|
28
tests/webtbs/tw8028.pp
Normal file
28
tests/webtbs/tw8028.pp
Normal file
@ -0,0 +1,28 @@
|
||||
program test;
|
||||
|
||||
{$mode objfpc}
|
||||
{$inline on}
|
||||
|
||||
type
|
||||
TTest = procedure of object;
|
||||
|
||||
TMyRecord = record
|
||||
Test: TTest;
|
||||
end;
|
||||
|
||||
TMyObject = class
|
||||
procedure Test;
|
||||
end;
|
||||
|
||||
function TMyRecordMake(const Test: TTest): TMyRecord; inline;
|
||||
begin
|
||||
Result.Test := Test;
|
||||
end;
|
||||
|
||||
procedure TMyObject.Test;
|
||||
begin
|
||||
TMyRecordMake(nil);
|
||||
end;
|
||||
|
||||
begin
|
||||
end.
|
Loading…
Reference in New Issue
Block a user