diff --git a/.gitattributes b/.gitattributes index d598e2ffa5..d601d7b501 100644 --- a/.gitattributes +++ b/.gitattributes @@ -13835,6 +13835,7 @@ tests/webtbs/tw25598.pp svneol=native#text/plain tests/webtbs/tw25603.pp svneol=native#text/pascal tests/webtbs/tw2561.pp svneol=native#text/plain tests/webtbs/tw25685.pp svneol=native#text/pascal +tests/webtbs/tw25814.pp svneol=native#text/plain tests/webtbs/tw2588.pp svneol=native#text/plain tests/webtbs/tw2589.pp svneol=native#text/plain tests/webtbs/tw2594.pp svneol=native#text/plain @@ -14611,6 +14612,7 @@ tests/webtbs/uw25059.test.pp svneol=native#text/pascal tests/webtbs/uw25059.withdot.pp svneol=native#text/pascal tests/webtbs/uw25132.pp svneol=native#text/pascal tests/webtbs/uw25598.pp svneol=native#text/plain +tests/webtbs/uw25814.pp svneol=native#text/plain tests/webtbs/uw2706a.pp svneol=native#text/plain tests/webtbs/uw2706b.pp svneol=native#text/plain tests/webtbs/uw2731.pp svneol=native#text/plain diff --git a/compiler/symdef.pas b/compiler/symdef.pas index c3f9d03e90..7c3ec079c1 100644 --- a/compiler/symdef.pas +++ b/compiler/symdef.pas @@ -5215,16 +5215,16 @@ implementation if assigned(inlininginfo) then include(procoptions,po_has_inlininginfo); - { Locals } - if assigned(localst) then - begin - tlocalsymtable(localst).deref; - tlocalsymtable(localst).derefimpl; - end; - { Inline } if (po_has_inlininginfo in procoptions) then begin + { Locals } + if assigned(localst) then + begin + tlocalsymtable(localst).deref; + tlocalsymtable(localst).derefimpl; + end; + inlininginfo^.code.derefimpl; { funcretsym, this is always located in the localst } funcretsym:=tsym(funcretsymderef.resolve); diff --git a/tests/webtbs/tw25814.pp b/tests/webtbs/tw25814.pp new file mode 100644 index 0000000000..e8d8da4cc4 --- /dev/null +++ b/tests/webtbs/tw25814.pp @@ -0,0 +1,25 @@ +{ %norun } +{ %recompile=-dchangeuses } + +unit tw25814; + +{$mode delphi} + +interface + +uses {$ifdef changeuses}sysutils,{$endif} classes, uw25814; + +type + test = class + function xyz(b: string): string; + end; + +implementation + +function test.xyz(b: string): string; +begin + result:=''; +end; + +end. + diff --git a/tests/webtbs/uw25814.pp b/tests/webtbs/uw25814.pp new file mode 100644 index 0000000000..06f54025ec --- /dev/null +++ b/tests/webtbs/uw25814.pp @@ -0,0 +1,12 @@ +unit uw25814; + +{$mode delphi} + +interface + +implementation + +uses tw25814; + +end. +