The code below (avail as download, wrongly reported at https://gitlab.com/freepascal.org/fpc/source/-/issues/40634#note_1777253148 => gen331_b.zip )
compiles in in 3.2.3, but not in 3.3.1

As for as I am concerned 3.3.1 is right. But should that change be mentioned on the user changes https://wiki.freepascal.org/User_Changes_Trunk ?

---------------------------------------------------
program class_nest;
{$mode ObjFPC}{$H+}
uses unit1;

type
  TDataPointDistanceTool = class(TDataPointTool) //   not inheriting from the nested class
  strict protected
    function FindRef(ADest: TDataPointTool.TPointRef): Boolean;
  end;

function TDataPointDistanceTool.FindRef(ADest: TDataPointTool.TPointRef): Boolean;
begin
  ADest.FGraphPos := 1;
end;

begin
end.

---------------------------------------------------
unit Unit1;
{$mode ObjFPC}{$H+}
interface
uses
  Classes, SysUtils;

type

  TDataPointTool = class
  public
  type
    TPointRef = class
    private
    protected
      FGraphPos: integer; // It is protected
    end;
  end;

implementation

end.

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to