Skip to content

Internal error 2013102303

Fpc 3.2.3 and Fpc 3.3.1 (3.3.1 from 11th Feb 2024)

Compile the below.

  • The commented type helper works (if the function bodies are added).
  • But in the inherited class an internal error happens
  • IT works if the base class uses: private (same unit), protected, or public. Just not for "strict protected"
program Project1;
{$ModeSwitch typehelpers}
type
  TDBGPtr = qword;

  TFpBreakPointMap = class abstract
  strict protected type
    { TFpBreakPointMapEntry }
    TFpBreakPointMapEntry = packed record
      InternalBreakPoint: Pointer;  // TFpInternalBreakpoint or TFpInternalBreakpointArray
      IsBreakList: ByteBool;
    end;
    PFpBreakPointMapEntry = ^TFpBreakPointMapEntry;

    { TFpBreakPointMapLocDataPair }
    TFpBreakPointMapLocDataPair = record
      Location: TDBGPtr;
      Data: PFpBreakPointMapEntry;
    end;

    //TFpBreakPointMapLocDataPairHelper = type helper for TFpBreakPointMapLocDataPair
    //  function OrigValue: Byte;
    //  function ErrorSetting: ByteBool;
    //end;
  end;


  TBreakLocationMap = class(TFpBreakPointMap)
  strict protected type
    TFpBreakPointMapLocDataPairHelper = type helper for TFpBreakPointMapLocDataPair
      function OrigValue: Byte;
      function ErrorSetting: ByteBool;
    end;
  end;

begin
end.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information