View Issue Details

IDProjectCategoryView StatusLast Update
0036857FPCCompilerpublic2020-04-02 11:23
ReporterAP-Soft Assigned ToMarco van de Voort  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
Summary0036857: False duplicate identifier compiler error with private members in derived cladd
DescriptionA private member in a class will cause a compiler error to be displayed,
if there is a private member with the same name in some predecessor class.
Steps To Reproduce
 tCompilerBug = class( TCustomApplication)
 private
    abc: String;
 protected
  procedure DoRun; override;
 public
 end;

 tAdvancedCompilerBug = class( tCompilerBug)
 private
    abc: String;
 protected
 public
 end;
Additional InformationThe second appearance is treated as duplicates identifier although both members are private.
In my eyes this is a contradiction against the scope "private".
Best regards!
TagsNo tags attached.
Fixed in Revision
FPCOldBugId
FPCTarget-
Attached Files

Activities

Bart Broersma

2020-04-02 10:50

reporter   ~0121836

This is about the compiler, so not about Lazarus.
Please take care where (project) you post reports.
Moving...

Marco van de Voort

2020-04-02 11:23

manager   ~0121837

This is not a bug and by design in mode objfpc.

This is easily visible since it does compile in $mode Delphi

Issue History

Date Modified Username Field Change
2020-04-02 10:30 AP-Soft New Issue
2020-04-02 10:50 Bart Broersma Note Added: 0121836
2020-04-02 10:50 Bart Broersma Project Lazarus => FPC
2020-04-02 11:23 Marco van de Voort Assigned To => Marco van de Voort
2020-04-02 11:23 Marco van de Voort Status new => resolved
2020-04-02 11:23 Marco van de Voort Resolution open => no change required
2020-04-02 11:23 Marco van de Voort FPCTarget => -
2020-04-02 11:23 Marco van de Voort Note Added: 0121837