This is quite surprising!

public struct S(T)
{
        T s;
}


interface I
{       
        void Go(T)(S!T s);

        static final I New()
        {
                return new C();
        }
}

abstract class A : I
{
        
}


class C : A
{
        void Go(T)(S!T s)
        {
                
        }
}


void main()
{
        S!int s;
        auto c = I.New();
        
        c.Go(s);    // fails!
//(cast(C)c).Go(s); // Works, only difference is we have made c an explicit C.
        
}

https://dpaste.dzfl.pl/dbc5a0663802

Everything works when Go is not templatized(we explicitly make T an int)


This is a blocker for me! Can someone open a ticket?



Reply via email to