When I tried to test out the following code the compiler segfaulted:


interface BarBase
{
        void do_a_thing();
}

interface Bar(T) : BarBase
{
static if(hasMember!(T, "rotation") && is(typeof(T.rotation) == double))
        {
                @property
                double rotation();
                
                final void do_a_thing()
                {
                        //do a thing with rotation;
                }
        }
        else
        {
                final void do_a_thing()
                {
                        //do a thing without rotation;
                }
        }
}

class Foo1 : Bar!Foo1
{
}

class Foo2 : Bar!Foo2
{
        @property
        double rotation() { return 1.0; };
}

Is there some rule against doing this or is it a glitch?

Reply via email to