[fpc-devel] Illegal type conversion: "<enumeration type>" to "TObject"

Sean McIlwain sean at scootersoftware.com
Wed Jul 16 23:05:49 CEST 2008


The following code fails to compile in Delphi mode but successfully 
compiles in objfpc mode:

type
  TEnum = (a, b, c);
var
  AValue: TEnum;
  AObject : TObject;
implementation

initialization
  AObject := TObject(AValue);



Could this be supported in the Delphi mode as well?

Thanks,
Sean





More information about the fpc-devel mailing list