* 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:
Jonas Maebe 2006-12-29 01:11:41 +00:00
parent e459f8a26f
commit 5988e6d117
3 changed files with 31 additions and 1 deletions

1
.gitattributes vendored
View File

@ -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

View File

@ -628,7 +628,8 @@ implementation
tempcreaten,
tempdeleten,
ordconstn,
pointerconstn:
pointerconstn,
niln:
exit;
else
begin

28
tests/webtbs/tw8028.pp Normal file
View 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.