diff --git a/.gitattributes b/.gitattributes index dd8d24b3ea..a0a986fe23 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5469,6 +5469,7 @@ tests/webtbf/tw3841.pp svneol=native#text/plain tests/webtbf/tw4103.pp svneol=native#text/plain tests/webtbf/tw4111.pp svneol=native#text/plain tests/webtbf/tw4139.pp svneol=native#text/plain +tests/webtbf/tw4144.pp svneol=native#text/plain tests/webtbf/uw0744.pp svneol=native#text/plain tests/webtbf/uw0840a.pp svneol=native#text/plain tests/webtbf/uw0840b.pp svneol=native#text/plain diff --git a/compiler/pdecl.pas b/compiler/pdecl.pas index ca11e118a4..c385535b57 100644 --- a/compiler/pdecl.pas +++ b/compiler/pdecl.pas @@ -524,7 +524,8 @@ implementation This need to be done after the rtti has been written, because it can contain a reference to that data (PFV) This is not for forward classes } - if (tt.def.deftype=objectdef) then + if (tt.def.deftype=objectdef) and + (tt.def.owner.symtabletype in [staticsymtable,globalsymtable]) then with Tobjectdef(tt.def) do begin if not(oo_is_forward in objectoptions) then diff --git a/tests/webtbf/tw4144.pp b/tests/webtbf/tw4144.pp new file mode 100755 index 0000000000..28af6c31eb --- /dev/null +++ b/tests/webtbf/tw4144.pp @@ -0,0 +1,14 @@ +{ Source provided for Free Pascal Bug Report 4144 } +{ Submitted by "Wiktor Sywula" on 2005-06-30 } +{ e-mail: wswiktor@poczta.fm } +procedure foo; +type + bar = object + constructor init; + procedure zzyzzy; virtual; + end; +begin +end; + +begin +end.