Should the order in which you implement interfaces have an effect in your code? 
It seems to be that way when you have two functions with the same name in the 
different interfaces. Here's an example:

import std.stdio : writeln;

interface Foo
{
    final void run() { writeln("foo"); } 
}

interface Bar
{
    final void run() { writeln("bar"); } 
}

class One : Foo, Bar
{
}

class Two : Bar, Foo
{
}

void main()
{
    with (new One)
    {
        run();  // writes foo
    }

    with (new Two)
    {
        run();  // writes bar
    }
}

Bug? Or legitimate working code?

Reply via email to