Hi,

consider this:

interface Base
{
  void setup();
}

interface FeatureX
{
  void x();
}

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

void main()
{
Base foo = new Foo(); // This would be the result of a factory class

  (cast(FeatureX)foo).x(); // 1
}

1) error: casting to interface FeatureX is not allowed in @safe code.

Question: How to call foo.x in @safe code ?

Reply via email to