View Issue Details

IDProjectCategoryView StatusLast Update
0029332FPCCompilerpublic2019-07-12 12:00
ReporterSDNAssigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Platformi386OSWindows 10 ProOS Version10.0.10586
Product Version3.0.0Product Build 
Target VersionFixed in Version 
Summary0029332: A nested class cannot inherit from a "strict protected" nested class in the ancestor of the outer class.
DescriptionThe summary is confusing, but the issue can be easily illustrated with an example:

program Issue;

type
  TBase = class
  strict protected
    type
      TMyThing = class
      end;
  end;

  TDescendant = class(TBase)
  strict private
    type
      TMyExtendedThing = class(TBase.TMyThing) //<- Compiler error here: "Identifier not found".
      end;
  end;

begin
end.
TagsNo tags attached.
Fixed in Revision
FPCOldBugId
FPCTarget
Attached Files

Activities

Marco van de Voort

2016-01-04 14:00

manager   ~0088609

Delphi XE3 seems to allow it.

Kazantsev Alexey

2016-01-04 14:54

reporter   ~0088612

Even Delphi 2006 allow it.

Serge Anvarov

2019-07-11 18:50

reporter   ~0117184

As temporary workaround:
    type
      TBaseTMyThing = TBase.TMyThing;
      TMyExtendedThing = class(TBaseTMyThing)

Ondrej Pokorny

2019-07-12 12:00

reporter   ~0117215

Just a note - it should compile without the "TBase." prefix as well (but it doesn't):

program Issue;
type
  TBase = class
  strict protected
    type
      TMyThing = class
      end;
  end;
  TDescendant = class(TBase)
  strict private
    type
      TMyExtendedThing = class(TMyThing) //<- Compiler error here: "Identifier not found".
      end;
  end;
begin
end.

Issue History

Date Modified Username Field Change
2016-01-04 11:37 SDN New Issue
2016-01-04 14:00 Marco van de Voort Note Added: 0088609
2016-01-04 14:54 Kazantsev Alexey Note Added: 0088612
2019-07-11 11:57 user5695 File Added: 119.pdf
2019-07-11 18:50 Serge Anvarov Note Added: 0117184
2019-07-12 12:00 Ondrej Pokorny Note Added: 0117215
2019-07-12 12:07 J. Gareth Moreton File Deleted: 119.pdf