E2501 La fonction inline ne peut pas appeler la routine imbriquée '%s' (Delphi)

De RAD Studio
Aller à : navigation, rechercher

Remonter à Messages d'erreur et d'avertissement (Delphi)

Cette erreur se produit lors de l'utilisation d'une fonction imbriquée dans une fonction inline.


program E2501;

{$APPTYPE CONSOLE}

uses
  SysUtils,
  UE2501 in 'UE2501.pas';

begin
  {E2501 Inline function cannot call nested routine '%s'}
end.


Unité où la fonction inline est définie avec la méthode imbriquée :


unit UE2501;

interface
procedure Foo; inline;
implementation
procedure Foo;
    procedure Bar;
    begin
    end;

  begin
    Bar(); //E2501 Fix: change the containing function to a regular function
  end;
end.