Reduced:

interface IBase {}
class Impl(T): IBase {
    T value;
}
void main() {
    IBase a = true ? (new Impl!uint) : (new Impl!string);
}



test.d(6,23): Error: cannot implicitly convert expression (new Impl!uint) of type object.Object to test.IBase

Bye,
bearophile

Reply via email to