abstract class AbstractObject(S)
if (IsSomeString!S)
{
}

class OtherObject(S, bool R) : AbstractObject!S
{
    int x;
    void Foo(int a, int b)
    {
        x = a + b;
        static if (R)  // error
        {
           // more codes .....
        }
    }
}

class OtherObjects(S) : AbstractObject!S
{
    OtherObject!(S, bool) a, b;   // error

    a = new OtherObject!(S, true)();
    b = new OtherObject!(S, false)();
}

Reply via email to