E2560 $OBJTYPENAME not allowed for '%s'; only global and non-alias type symbol (Delphi)

From RAD Studio
Jump to: navigation, search

Go Up to Error and Warning Messages (Delphi)

This occurs when defining an object type name on an aliased object or an object defined inside a scope.


program E2560;

{$APPTYPE CONSOLE}

uses
  SysUtils;

type
  TAliasedObject = TObject;
  {$OBJTYPENAME TAliasedObject 'TAliasedObject'}
begin
  {E2560 $OBJTYPENAME not allowed for '%s'; only global and non-alias type symbol}
end.