Is there a reason why

```d
class Base {}
class Derived : Base {}

@safe pure nothrow unittest {
        Base b;
        Derived d;
        b = d; // pass

        Base[] bs;
        Derived[] ds;
        bs ~= ds; // pass
        bs = ds; // fail [1], should pass
        bs = cast(Base[])ds; // fail [2], should pass
}
```

fails as

[1]: cannot implicitly convert expression `ds` of type `Derived[]` to `Base[]`
[2]: cast from `Derived[]` to `Base[]` not allowed in safe code

?

Reply via email to