* Do not write access-info for properties referencing class-fields. Because

class-fields do not have debug-info yet.
This commit is contained in:
Joost van der Sluis 2022-05-22 22:29:49 +02:00 committed by FPK
parent 2950785bd7
commit 2812915d4f
2 changed files with 24 additions and 1 deletions

View File

@ -2971,7 +2971,11 @@ implementation
end;
end
// Note that the returned 'dwarfoffset' is not used and not a dwarf-offset
else if get_symlist_sym_offset(accesslist.firstsym, membersym, dwarfoffset) then
else if get_symlist_sym_offset(accesslist.firstsym, membersym, dwarfoffset) and
// Debuginfo for static members is not written
// It is not possible to reference something that is not there, so
// omit te reference.
not (sp_static in membersym.symoptions) then
begin
memberowner := membersym.owner;
if (membersym.typ <> fieldvarsym) then

View File

@ -0,0 +1,19 @@
{ %OPT=-gw -godwarfproperties }
program tdwarfproperties2;
{$mode objfpc}{$H+}
type
TClassProp=class(TObject)
private
class var FProcessorCount: LongWord;
public
class property ProcessorCount: LongWord read FProcessorCount;
end;
var
P: TClassProp;
begin
end.