summaryrefslogtreecommitdiff
path: root/tests/webtbs/tw8028.pp
diff options
context:
space:
mode:
authorjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2006-12-29 01:11:41 +0000
committerjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2006-12-29 01:11:41 +0000
commit6ac689b4c1bdc2289ec181fcf9dcadc2b9931653 (patch)
tree7f04ea60ab3628e9d464fa00dbcad8a4698f6dd3 /tests/webtbs/tw8028.pp
parent5cbe247e9c1d6693a9a6d4ec97e5d3c8094f56a5 (diff)
downloadfpc-6ac689b4c1bdc2289ec181fcf9dcadc2b9931653.tar.gz
* niln has a compelxity of 0 (so the inlining code doesn't try to take
its address) (mantis 8028) git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@5735 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'tests/webtbs/tw8028.pp')
-rw-r--r--tests/webtbs/tw8028.pp28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/webtbs/tw8028.pp b/tests/webtbs/tw8028.pp
new file mode 100644
index 0000000000..cfa53d5eab
--- /dev/null
+++ b/tests/webtbs/tw8028.pp
@@ -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.