It has some bug for sure, or the interface should be reconsidered:
interface I1 { int foo(); }
interface I2 { const int foo(); }
class C1 : I2,I1{
int foo() { return 0; }
const int foo() { return 1; }
}
class C2 : I1,I2{
int foo() { return 0; }
const int foo() { return 1; }
}
C1 won't comp
I've tried to implement a const, non-const accessor for a class similar to c++:
a& at(int) const;
a at(i);
With class it works as expected
class C1
{
int a;
const int foo() { return 2; }
ref int foo() { return a; }
}
Than I wanted to do it using interfaces:
inte