[fpc-devel] Illegal type conversion: "<enumeration type>"	to "TObject"
    Marco van de Voort 
    marcov at stack.nl
       
    Fri Jul 18 10:31:01 CEST 2008
    
    
  
> On Thu, 17 Jul 2008, Florian Klaempfl wrote:
> > > 
> > > 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?
> > 
> > Please submit a bug report.
> 
> Eh ? 
> As far as I'm concerned this should not compile in Objfpc mode as well ?
It should compile if sizeof(tenum)=sizeof(tobject) else not? So probably
also in Delphi this code depends on $Z ($minenum)
    
    
More information about the fpc-devel
mailing list