mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-20 17:09:34 +02:00
* Do not write access-info for properties referencing class-fields. Because
class-fields do not have debug-info yet.
This commit is contained in:
parent
2950785bd7
commit
2812915d4f
@ -2971,7 +2971,11 @@ implementation
|
|||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
// Note that the returned 'dwarfoffset' is not used and not a dwarf-offset
|
// 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
|
begin
|
||||||
memberowner := membersym.owner;
|
memberowner := membersym.owner;
|
||||||
if (membersym.typ <> fieldvarsym) then
|
if (membersym.typ <> fieldvarsym) then
|
||||||
|
19
tests/test/tdwarfproperties2.pp
Normal file
19
tests/test/tdwarfproperties2.pp
Normal 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.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user