Re: [fpc-pascal] Interface type error

2020-02-02 Thread Sven Barth via fpc-pascal
Am 02.02.2020 um 12:49 schrieb Ryan Joseph via fpc-pascal: On Feb 2, 2020, at 3:23 PM, Sven Barth via fpc-pascal wrote: As I had explained in the other thread some months ago interfaces in Object Pascal mean literally that the type can be cast to the specified interfaces. Parent interfaces

Re: [fpc-pascal] Interface type error

2020-02-02 Thread Ryan Joseph via fpc-pascal
> On Feb 2, 2020, at 3:23 PM, Sven Barth via fpc-pascal > wrote: > > As I had explained in the other thread some months ago interfaces in Object > Pascal mean literally that the type can be cast to the specified interfaces. > Parent interfaces are *not* part of this. If you want this you

Re: [fpc-pascal] Interface type error

2020-02-02 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am So., 2. Feb. 2020, 03:37: > Why doesn't this compile? IClassName2 descends from IClassName1 so > shouldn't TClassName be compatible with IClassName1? > > > > {$mode objfpc} > {$interfaces corba} > > program test; > >

[fpc-pascal] Interface type error

2020-02-01 Thread Ryan Joseph via fpc-pascal
Why doesn't this compile? IClassName2 descends from IClassName1 so shouldn't TClassName be compatible with IClassName1? {$mode objfpc} {$interfaces corba} program test; type IClassName1 = interface end; IClassName2 = interface(IClassName1) end;