Intended to be able to RefCount an interface?

weaselcat via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Feb 9 20:44:53 PST 2015


Thread title.


interface Itest{

}

class testclass : Itest{
}

void main()
{
     import std.typecons;
     auto test = RefCounted!Itest(new testclass());
}

If you change the refcounted to type testclass it doesn't compile 
because refcounted doesn't support classes.

Is this a bug, or intended?


More information about the Digitalmars-d-learn mailing list