E2501 インライン関数はネストしたルーチン '%s' を呼び出せません(Delphi)

提供: RAD Studio
移動先: 案内検索

エラーと警告のメッセージ(Delphi) への移動


このエラーは、ネストした関数をインライン関数内で使用したときに発生します。


program E2501;

{$APPTYPE CONSOLE}

uses
  SysUtils,
  UE2501 in 'UE2501.pas';

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


ネストしたメソッドを使用するインライン関数が定義されているユニット:


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.