diff --git a/.gitattributes b/.gitattributes index ac45c4c08e..198a1b6e02 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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 diff --git a/compiler/nutils.pas b/compiler/nutils.pas index f62990aa5e..076293b501 100644 --- a/compiler/nutils.pas +++ b/compiler/nutils.pas @@ -628,7 +628,8 @@ implementation tempcreaten, tempdeleten, ordconstn, - pointerconstn: + pointerconstn, + niln: exit; else begin 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.