[fpc-pascal] Typecast class-of to class

Mattias Gaertner nc-gaertnma at netcologne.de
Sun Feb 19 01:07:09 CET 2017


Hi,

FPC allows to type cast a class-of variable to a class instance. Is
this a bug or a feature?

var
  c: TClass;
begin
  TObject(c).ClassName; // crash
end.
  

Mattias



More information about the fpc-pascal mailing list