interface final members

2012-02-21 Thread Joshua Reusch
interface I { final int foo(I other, int a, int b) { return other.foo(a,b) + a*b; } int foo(int a, int b); } class A : I { int foo(int a, int b) { return a*b; } } void main() { A a = new A; a.foo(5,5);

Re: interface final members

2012-02-21 Thread Mantis
21.02.2012 14:46, Joshua Reusch пишет: interface I { final int foo(I other, int a, int b) { return other.foo(a,b) + a*b; } int foo(int a, int b); } class A : I { int foo(int a, int b) { return a*b; } } void main() { A a = new A; a.foo(5,5); a.I.foo(a, 5,5); a.foo(a, 5,5); //line 22 }

Re: interface final members

2012-02-21 Thread Jacob Carlborg
On 2012-02-21 14:15, Mantis wrote: 21.02.2012 14:46, Joshua Reusch пишет: interface I { final int foo(I other, int a, int b) { return other.foo(a,b) + a*b; } int foo(int a, int b); } class A : I { int foo(int a, int b) { return a*b; } } void main() { A a = new A; a.foo(5,5); a.I.foo(a, 5,5);

Re: interface final members

2012-02-21 Thread Ali Çehreli
On 02/21/2012 09:58 AM, Ali Çehreli wrote: The reason that I think so is that when the 'I other' is moved to a parameter location other than the first one, it works: No, it doesn't work. Sorry for the noise. Ali