RAD Studio Athens

E2133

Go Up to Error and Warning Messages (Delphi)

You have attempted to obtain type information for an identifier which does not represent a type.


program Produce;

  var
    pย : Pointer;

  procedure NotType;
  begin
  end;


begin
  pย := TypeInfo(NotType);
end.

The TypeInfo standard procedure requires a type identifier as it's parameter. In the code above, 'NotType' does not represent a type identifier.


program Solve;

  type
    Base = class
    end;

  var
    pย : Pointer;

begin
  pย := TypeInfo(Base);
end.

By ensuring that the parameter used for TypeInfo is a type identifier, you will avoid this error.