Best error msg ever

Mike Parker via Digitalmars-d digitalmars-d at puremagic.com
Mon Feb 13 06:46:38 PST 2017


On Monday, 13 February 2017 at 13:38:23 UTC, Kagamin wrote:
> On Monday, 13 February 2017 at 13:21:44 UTC, Daniel Kozak wrote:
>> and I guess even ComObject does not inherit from Object
>
> This compiles:
> void f()
> {
> 	import core.sys.windows.com;
> 	ComObject a;
> 	Object b=a;
> }

"References cannot be upcast to the enclosing class object, nor 
can they be downcast to a derived interface."

https://dlang.org/spec/interface.html#com-interfaces


More information about the Digitalmars-d mailing list