Restriction on interface function types

Steve Teale steve.teale at britseyeview.com
Wed Mar 12 03:57:08 PDT 2014


interface I
{
    auto myType();
}

class A: I
{
    auto myType() { return cast(A) null; }
}

void main()
{
    I x = getSomeI();
    typeof(x.myType()) y;
}


More information about the Digitalmars-d mailing list