Casting to interface not allowed in @safe code?

Jim jimwoo21680 at hotmail.com
Tue May 21 07:16:49 UTC 2019


On Tuesday, 21 May 2019 at 07:04:27 UTC, rumbu wrote:
> On Tuesday, 21 May 2019 at 05:51:30 UTC, Jim wrote:
>
> That's because foo is of type Base, not implementing FeatureX.

Right, Base isn't implementing FeatureX, but foo is really a Foo 
which does:

> class Foo: Base, FeatureX
> {
>   void setup(){};
>   void x(){};
> }

and it works in @system code.


More information about the Digitalmars-d-learn mailing list